Forums / Cotonti / Support / Tags issue with mod_rewrite

An interesting problem.

Trustmaster
#28140 2011-01-28 03:45
This might be caused by the order of .htaccess rules. Specified rules should go before generic rules, so more correct order is:
RewriteEngine On
RewriteBase /
RewriteRule ^(datas|images|js|skins)/(.*)$ $1/$2 [QSA,NC,NE,L]
RewriteRule ^list/([^/&?#]+)(.*)$ list.php?c=$1$2 [QSA,NC,NE,L]
RewriteRule ^xml/([^/&?#]+)(.*)$ xml.php?c=$1$2 [QSA,NC,NE,L]
RewriteRule ^search/([^/&?#]+)/(.*)$ plug.php?tab=$1&?e=search$2 [QSA,NC,NE,L]
RewriteRule ^tags/([^/&?#]+)/([^/&?#]+)/(.*)$ plug.php?a=$1&t=$2&e=tags$3 [QSA,NC,NE,L]
RewriteRule ^contactus(.*)$ plug.php?e=contactus$1 [QSA,NC,NE,L]
RewriteRule ^rss/([^/&?#]+)(.*)$ rss.php?c=$1$2 [QSA,NC,NE,L]
RewriteRule ^list/([^/&?#]+)/(.*)$ list.php?c=$1$2 [QSA,NC,NE,L]
RewriteRule ^([^/&?#]+)/([^/&?#]+)/(.*)$ page.php?c=$1&al=$2$3 [QSA,NC,NE,L]
RewriteRule ^([^/&?#]+)/([^/&?#]+)(.*)$ page.php?c=$1&al=$2$3 [QSA,NC,NE,L]
May the Source be with you!