Laravel在实时服务器上只能使用“主页”路由

时间:2018-07-12 10:50:13

标签: laravel apache url server

我需要有关服务器上URL的帮助...

这是我的示例:

10.10.10.50/projectname/-工作 10.10.10.50/登录-不起作用

10.10.10.50/ 项目名称 /登录-工作

主要问题是,如果我单击页面上的某些内容(例如“登录”),则直接输入10.10.10.50/login,而不是10.10.10.50/projectname/login

在httpd.conf文件中,我允许全部覆盖:

<Directory />
Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
</Directory>

这是我的htaccess文件:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>     Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ / [L,R=301]
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/ [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public// [L,NC]
</IfModule

谢谢

0 个答案:

没有答案