Forums / Cotonti / Support / mod_rewrite HELP needed

url rewriting in .htaccess to create SEO subdomains and subfolders

donP
#23695 2010-03-21 23:01
Thanks, Koradhil ;)
Now everything seems to work fine but the
RewriteRule ^/$ http://www.example.com/list.php?c=%1 [NC,QSA]
I think because the %1 would be a backreference from last matched RewriteCond directive in the current bunch of conditions (as Apache documentation says), and in
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
there are no backreferences at all..

I had tried changing RewriteCond with this one:
RewriteCond %{HTTP_HOST} !^(articles|downloads|news|docs)\.sangelo\.net$ [NC]
but nothing happens... all levels (pages and lists) works well... but http://articles.sangelo.net or http://downloads.sangelo.net etc displays me the main page of site (like www.sangelo.net) and they don't guide me to list.php?c=maincat

It's the
RewriteRule ^/$ list.php?c=%1 [QSA,NC,NE,L]
written in right syntax?

Elsewhere I found
RewriteRule ^(.*)$ list.php?c=%1 [QSA,NC,NE,L]
but that one causes me many errors... :/
in [color=#729FCF][b]BLUES[/b][/color] I trust