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
    Regular Coder Mooseman's Avatar
    Join Date
    Sep 2010
    Posts
    123
    Thanks
    7
    Thanked 3 Times in 3 Posts

    Using .htaccess to forward lower-case directories?

    I would like to use my .htaccess to redirect users from lower-case directory names to the upper-case directory names when they exist. (e.g. example.com/directory to example.com/DIRECTORY when the directory "DIRECTORY" exists)

    Is this possible? Thanks!

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    366
    Thanks
    0
    Thanked 18 Times in 18 Posts
    You would need a RewriteMap which requires access to the server configuration.

    You could use a custom 404 error handler and a server-side script.
    Code:
    ErrorDocument 404 /custom404handler.php


  •  

    Tags for this Thread

    Posting Permissions

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