Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-22-2011, 07:47 AM   PM User | #1
CalumK
New Coder

 
Join Date: Jan 2009
Posts: 53
Thanks: 4
Thanked 3 Times in 3 Posts
CalumK is an unknown quantity at this point
.htaccess rewrite

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
CalumK is offline   Reply With Quote
Old 07-08-2011, 10:50 PM   PM User | #2
Cags
New Coder

 
Join Date: Jul 2011
Posts: 67
Thanks: 0
Thanked 13 Times in 13 Posts
Cags is an unknown quantity at this point
Code:
RewriteRule ^file/file/filename-db[0-9]+ /file/file/filename [L]
Cags is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:28 PM.


Advertisement
Log in to turn off these ads.