...

View Full Version : .htaccess rewrite



CalumK
06-22-2011, 07:47 AM
Hi i need to write a .htaccess file that can forward all urls such as

example.com/file/file/filename-dp7
or
example.com/file/file/filename-dp3
or
example.com/file/file/filename-dp17

to
example.com/file/file/filename


any ideas? i presume it would use mod_rewrite, with Regular expressions, but im a bit stumped...

anyone got any ideas?

Thanks

Calum

Cags
07-08-2011, 10:50 PM
RewriteRule ^file/file/filename-db[0-9]+ /file/file/filename [L]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum