toxicious Posted November 10, 2012 Share Posted November 10, 2012 (edited) I have written some rules in my .htaccess file but they don't work as I want them to. I have these: RewriteRule ^news/page/([0-9]+)/?$ news?page=$1 [NC,QSA]RewriteRule ^([0-9a-z-_]+)/?$ index.php?p=$1 [NC,QSA] Here are some scenarios: Url - Should go to - works? /news - /index.php?p=news - yes/news/page/2/ - /news?page=2 => /index.php?p=news&page=2 - no I have similar rules, with the exact same regex on my IIS server and there it works.If I change the first rule to be like this: RewriteRule ^news/page/([0-9]+)/?$ index.php?p=news&page=$1 [NC,QSA] It works. Which means that it succeeds in matching the first url, but the one that is created out of the first match isn't matched anymore...I don't have any logging possiblities since it is shared hosting. Edited November 10, 2012 by toxicious Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now