mardi 28 avril 2015

URL rewrite htaccess in xenforo not working

In my simple module, I am trying to rewrite the url using htaccess this is what I have: http://localhost/xf/film?ep=2 And I want: http://localhost/xf/film/episode-2

Mod rewrite is enable. Here is my .htaccess file:

RewriteEngine On

#   If you are having problems with the rewrite rules, remove the "#" from the
#   line that begins "RewriteBase" below. You will also have to change the path
#   of the rewrite to reflect the path to your XenForo installation.
RewriteBase /xf

#   This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteRule ^film/episode-([0-9]+)$ film?ep=$1 [NC,L]

Aucun commentaire:

Enregistrer un commentaire