[英]Laravel URL rewrite is not working on Ubuntu 18.04
I have probably tried all the solution available online.我可能已经尝试了所有在线可用的解决方案。 Still dont understand why URL rewrite is not working for me in this Linode Ubuntu 18.04 VPS.仍然不明白为什么 URL 重写在这个 Linode Ubuntu 18.04 VPS 中对我不起作用。
.htaccess Options -MultiViews .htaccess 选项 -MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
From apache2.conf来自 apache2.conf
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
/etc/apache2/sites-available/regenucell.com.conf /etc/apache2/sites-available/regenucell.com.conf
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin webmaster@regenucell.com
ServerName regenucell.com
ServerAlias regenucell.com www.regenucell.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/html/regenucell.com/public_html/mms/public
# Log file locations
LogLevel warn
ErrorLog /var/www/html/regenucell.com/log/error.log
CustomLog /var/www/html/regenucell.com/log/access.log combined
<Directory "/var/wwwhtml/regenucell.com/public_html/mms/public">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Any clue is highly appreciated.任何线索都受到高度赞赏。
Please check mod rewrite is enabled first.请先检查 mod rewrite 是否启用。
Also check directory directive in your virtual host file www and html is missing/ I believe.还要检查虚拟主机文件 www 中的目录指令,并且 html 丢失/我相信。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.