.htaccess: Rewrite Problem
I'm creating a website. I have this code in the .htaccess file:
RewriteEngine On
RewriteRule ^/([-a-zA-Z0-9开发者_开发技巧_]+)/$ /redirect.php?id=$1
But when I go to, for example /ASEi it says 404 Not Found. What's the problem?Try this instead:
RewriteRule ^/([-a-zA-Z0-9_]+)/$ /redirect.php?id=$1
I found it, the problem was the first /
. The .htaccess now looks like:
RewriteEngine On
RewriteRule ^([-a-zA-Z0-9_]+)$ redirect.php?id=$1
精彩评论