Форуми / Cotonti / Support / I need help with mod_rewrite

mod_rewrite for dummies

GHengeveld
#28015 19.01.2011 18:53
urltrans.dat is correct (take care of the tabs, they're important).

As for .htaccess, that looks good too. Just make sure you have this in there as well:

Options FollowSymLinks -Indexes -MultiViews
DirectoryIndex index.php

RewriteEngine On
RewriteBase /

RewriteRule ^(datas|images|js|lib|modules|plugins|themes)/(.*)$ $1/$2 [L]

Make sure that the rules for page/list are at the bottom in the .htaccess. Also, don't remove the other rules for admin,users etc, because otherwise those pages will become inaccessible. Add these rules for messages to work:

RewriteRule ^message/([0-9]+)$		message.php?msg=$1 [NC,NE,QSA,L]
RewriteRule ^message/([0-9]+)/(.*)$	message.php?msg=$1&redirect=$2 [NC,NE,QSA,L]

You can download my htaccess and urltrans here.

Відредаговано: Koradhil (19.01.2011 18:59, 14 років тому)