因此,在我的工作服务器中,我有多个laravel应用程序,而且我也不允许使用任何.htaccess文件(AllowOverride无)。
因此,我没有使用.htaccess而是将其转移到httpd-userdir.conf中,并且我尝试对目录指令进行通配符以避免重复
<Directory "/home/www/*/public">
AllowOverride None
php_flag engine on
Require all granted
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</Directory>
我遇到内部服务器错误。谁能告诉我RewriteRule出了什么问题?