.htaccess 未知语法错误
.htacces Unknown Syntax Error
我的 .htaccess 文件出现某种错误:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^\.]+)$ .php [NC]
RewriteCond %{REQUEST_FILENAME} >""
RewriteRule ^([^\.]+)$ profile.php?user= [L]</pre>
还不知道哪里出了问题!
我正在尝试制作永久链接连接器。因此,如果用户输入 "localhost/postin'/profiles/username_here",它将把他们重定向到类似于 "localhost/postin'/profiles/profile.php?user=username_here"
的 URL
它产生的错误是:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator at admin@example.com to inform
them of the time this error occurred, and the actions you performed
just before this error.
More information about this error may be available in the server error
log.
替换你的规则并试试这个。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profiles/([^/]+)/?$ /profiles/profile.php?user= [L,QSA]
我的 .htaccess 文件出现某种错误:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^\.]+)$ .php [NC]
RewriteCond %{REQUEST_FILENAME} >""
RewriteRule ^([^\.]+)$ profile.php?user= [L]</pre>
还不知道哪里出了问题!
我正在尝试制作永久链接连接器。因此,如果用户输入 "localhost/postin'/profiles/username_here",它将把他们重定向到类似于 "localhost/postin'/profiles/profile.php?user=username_here"
的 URL它产生的错误是:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
替换你的规则并试试这个。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profiles/([^/]+)/?$ /profiles/profile.php?user= [L,QSA]