Here's my mod_rewrite syntax:
My problem is that I need to pass the first RewriteCond back reference (%1) to all the RewriteRules, but that's not what happens. For some reason only the first active rule can access the value in %1.Code:RewriteCond %{HTTP_HOST} ^([a-z]+)\.domain\.com [NC] RewriteCond %{HTTP_HOST} !^(www\.)domain\.com [NC] RewriteRule ^help/([_0-9a-z-]+)/([_0-9a-z-]+)/?$ http://subdomain.domain.com/index.php?1=help-article&2=0&3=$1&4=$2 [QSA,P] RewriteRule ^([_0-9a-zA-Z-]+)?/?([_0-9a-zA-Z-]+)?/?([_0-9a-zA-Z-]+)?/?([_0-9a-zA-Z-]+)?/?([_0-9a-zA-Z-]+)?/?([_0-9a-zA-Z-]+)?/?$ http://subdomain.domain.com/index.php?2=$1&3=$2&4=$3&5=$4&6=$5&7=%1 [QSA,L,P]
Any ideas?






Bookmarks