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
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess rewriting

    Would someone please be able to help me with .htaccess to change:

    http://site.com/subfolder/?value=click&class=XXX

    to

    http://site.com/?id=XXX

    Where XXX is a number?

    Thank you in advance.

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    356
    Thanks
    0
    Thanked 16 Times in 16 Posts
    The user should visit /?id=XXX but should see /subfolder/?value=click&class=XXX?

    Try
    Code:
    Options +FollowSymLinks
    
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} ^(.*&)?id(=.+)$ [NC]
    RewriteRule ^$ /subfolder/?value=click&%1class%2 [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
    •