I have a .htaccess
file written as follows:
RewriteEngine On
RewriteRule ^/?([^/.]+)$ display.php?category=$1 [B,L]
RewriteRule ^gallery/([^/.]+)/?$ gallery.php?category=$1 [L]
RewriteRule ^([-_\+A-Za-z0-9,]+)$ displayitem.php?item=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ displayitem.php?item=$1&start=$2&page=$3 [L,QSA]
The problem occurs while displaying the displayitem.php?item=$1
. When I try to execute this command, the page will stay on previous page and the displayitem.php
will not be found.
This is weird. If I comment out the following line:
RewriteRule ^/?([^/.]+)$ display.php?category=$1 [B,L]
which is used to pass utf-8 character, everything works fine and all the rules will be executed and all the parameters will be passed. However, utf-8 character will not be passed correctly and echo Page Not found.
Please help!! Thanks.