Monday, April 30, 2012

My mod_rewrite code in htaccess caused the page to not load

I have horrible URLs like this:



http://example.com/subfolder/index.php?a=1&b=1&token=8d519decbe60db44154b1fbc8c553ac4



I am trying to make it look like this:



http://example.com/subfolder/menu/1/1/#/



But this code is causing the page to crash/not be found or something:



RewriteEngine on

RewriteCond %{QUERY_STRING} ^a=([0-9]+)&b=([0-9]+)&token=([A-Za-z0-9]+)
RewriteRule ^subfolder/index.php /menu/$1/$2/#? [R=301,L]


I put this .htaccess file in my root folder example.com/.htaccess, do I need to put it in the subfolder?



I'm getting 404 page not found error !





No comments:

Post a Comment