therealwesfoster Posted December 5, 2008 Share Posted December 5, 2008 Here's the code: RewriteCond %{HTTP_HOST} ^([^\.]+)\.site\.net$ [NC] RewriteCond %1 !^(www|ftp|mail)$ [NC] # Rule 1 RewriteRule ^([\w-]+)/view/([\w-]+)$ ./$2.php?cat=%1&do=$1 [NC,L,QSA] # Rule 2 RewriteRule ^([\w-]+)/([\w-]+)/([\d]+)/view/([\w-]+)$ ./$4.php?cat=%1&do=$1&name=$2&id=$3 [NC,L,QSA] The problem: #Rule1 works fine. All the GET vars are replaces by their correct backreference. #Rule2 however does not work. All of the $vars work, but the %var (rewritecond) doesn't work. Now if I flip Rule1 and Rule2 around, then Rule 2 will work, and not rule1. So it's like the %var gets erased after the first RewriteRule is scanned through. Help please! Wes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.