Xampp 的虚拟主机上的 500 内部服务器错误
500 Internal Server Error on Xampp's Virtual Host
我正在使用 Xampp 并且我的计算机中有很多 Web 项目,所以我决定创建一个虚拟主机,但是当我使用 htaccess 时,日志中出现以下错误重写规则以创建一些友好的 URL:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
我已经尝试了这里发布的很多东西,但没有任何效果...你们能帮帮我吗?
我的虚拟主机:
<VirtualHost myproject.com:80>
ServerName myproject.com
ServerAlias www.myproject.com
DocumentRoot "D:/xampp/www/myproject"
<Directory "D:/xampp/www/myproject">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我的.htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^404/$ /404.html [L]
RewriteRule ^404$ /404.html [L]
RewriteRule ^([^/]*)/$ /index.php?p= [L]
RewriteRule ^([^/]*)$ /index.php?p= [L]
非常感谢你:D
这些是非常简单的规则,但它应该适合您的情况,并且应该可以帮助您开始构建一些更复杂的重写规则。
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(404|404\/)$ /404.html [L]
# Make sure to avoid loops.
# Ignore rewrite rules for the files and directories that
# exist (such as index.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?p= [L]
我正在使用 Xampp 并且我的计算机中有很多 Web 项目,所以我决定创建一个虚拟主机,但是当我使用 htaccess 时,日志中出现以下错误重写规则以创建一些友好的 URL:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
我已经尝试了这里发布的很多东西,但没有任何效果...你们能帮帮我吗?
我的虚拟主机:
<VirtualHost myproject.com:80>
ServerName myproject.com
ServerAlias www.myproject.com
DocumentRoot "D:/xampp/www/myproject"
<Directory "D:/xampp/www/myproject">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我的.htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^404/$ /404.html [L]
RewriteRule ^404$ /404.html [L]
RewriteRule ^([^/]*)/$ /index.php?p= [L]
RewriteRule ^([^/]*)$ /index.php?p= [L]
非常感谢你:D
这些是非常简单的规则,但它应该适合您的情况,并且应该可以帮助您开始构建一些更复杂的重写规则。
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(404|404\/)$ /404.html [L]
# Make sure to avoid loops.
# Ignore rewrite rules for the files and directories that
# exist (such as index.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?p= [L]