【发布时间】:2018-03-05 13:53:16
【问题描述】:
请在下面找到我的 Laravel 网站 URL:www.webrox.ae
这个网站的问题是......它打开 /index.php 并且对于所有菜单项,如投资组合或雇用我们等,它打开 name/oservices/public/portfolio.. 像这样的东西,......
下面是我的 htaccess 文件
请指导
#Alternate default index page
DirectoryIndex www.webrox.ae/index.php
# BlueHost.com
# .htaccess main domain to subdirectory redirect
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
# Change 'subdirectory' to be the directory you will use for your main domain.
# Don't change the following two lines.
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?webrox.ae$
RewriteCond %{REQUEST_URI} !^/oservice/public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /oservice/public/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?webrox.ae$
RewriteRule ^(/)?$ webrox.ae/index.php [L]
RewriteCond %{HTTP_HOST} ^www\.webrox\.ae$
RewriteRule ^/?$ "http\:\/\/webrox\.ae\/" [R=301,L]
谢谢
【问题讨论】:
-
你的意思是index.php吗?它是一个 lravel,所以请说出你在说哪条路
-
从 DirectoryIndex 中删除 /index.php 后尝试。默认情况下需要。我不确定,但你可以试试
-
尝试创建你的bolg时生成的默认htaccess