不知何故,我的.htaccess文件出现了错误:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^\.]+)$ $1.php [NC]
RewriteCond %{REQUEST_FILENAME} >""
RewriteRule ^([^\.]+)$ profile.php?user=$1 [L]</pre>但我不知道是怎么回事!
我正在试着制作一个永久链接连接器。因此,如果用户输入“localhost/postin‘/profile/username_here”,就会将它们重定向到类似于这个"localhost/postin'/profiles/profile.php?user=username_here“的URL
它正在产生的错误是:
内部服务器错误 服务器遇到内部错误或配置错误,无法完成请求。 请与admin@example.com的服务器管理员联系,通知他们此错误发生的时间以及您在此错误之前执行的操作。 有关此错误的详细信息可在服务器错误日志中获得。
发布于 2015-01-15 00:10:35
取代你的规则,试一试。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profiles/([^/]+)/?$ /profiles/profile.php?user=$1 [L,QSA]https://stackoverflow.com/questions/27954357
复制相似问题