View Full Version : MOD_REWRITE rule doesn't work
macleodjb
07-06-2008, 05:05 PM
Hi Guys, I was hoping you could tell me why this rule doesn't seem to work properly. I'm not completely versed in how this works so i'm just taking a stab at it.
RewriteRule ^(.+)/(.+)\.html?page=(.+)$ search.php?q=$2&page=$3
Thanks in advance.
oesxyl
07-06-2008, 06:39 PM
Hi Guys, I was hoping you could tell me why this rule doesn't seem to work properly. I'm not completely versed in how this works so i'm just taking a stab at it.
RewriteRule ^(.+)/(.+)\.html?page=(.+)$ search.php?q=$2&page=$3
Thanks in advance.
try this corrections:
^(.+)\/(.+)\.html\?page=(.+)$
PS: I assume that you know that mod_rewrite is enabled and work.
regards
macleodjb
07-06-2008, 07:15 PM
Yes mod_rewrite is enabled and is already working on other pages. I did however try your suggestion and it gave me a 404 error. Any more suggestions? Or is this working now, and i have a problem with my landing page.
oesxyl
07-06-2008, 07:42 PM
Yes mod_rewrite is enabled and is already working on other pages. I did however try your suggestion and it gave me a 404 error. Any more suggestions? Or is this working now, and i have a problem with my landing page.
check with a page url you are sure that exists and this way you check also how rewrite rule work.
will be better if you can see the url before and after rewriting with some tools. can use the browser:
1. comment rule in .htaccess
2. check some url
3. uncomment the rule
4. check again with same url, this must be rewrite
because is dependent of server configuration probably you must try few times until will work.
post problems if don't work, I will try to help.
regards
macleodjb
07-13-2008, 12:15 AM
In case anyone else has this same problem...Here's what i did to make it work
RewriteRule ^(.+)/(.+)\.html$ search.php?q=$2&%{QUERY_STRING}
I hope it helps someone
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.