Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    58
    Thanks
    4
    Thanked 3 Times in 3 Posts

    .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

  • #2
    New Coder
    Join Date
    Jul 2011
    Posts
    67
    Thanks
    0
    Thanked 13 Times in 13 Posts
    Code:
    RewriteRule ^file/file/filename-db[0-9]+ /file/file/filename [L]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •