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 to the CF scene
    Join Date
    Jan 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Yet more .htaccess help requested...

    Hi all. I'm very new to the non-windows side of the web development, and even newer to regex and .htaccess rewrites. I've dug through the forums, and while there's a ton of info, I'm still a little lost.

    What I'm trying to do is set upa site that will route like this:

    www.mysite.com/SomeName/ -rewrites to: index.php?id=abc123
    www.mysite.com/anothername/ - rewrites to: index.php?id=def456

    and so on - to the tun of about 60-70 unique IDs. I also have to make sure that the faux directory name is case insensitive.

    Any help is appreciated. thanks in advance!

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Location
    Norway
    Posts
    118
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Try this one

    Code:
    RewriteRule ^([^/]*).*$ index.php?id=$1
    It should make www.mysite.com/index.php?id=abc123 into www.mysite.com/abc123


  •  

    Posting Permissions

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