HtAccess Laravel

问题描述 投票:-1回答:1

请在下面找到我的Laravel网站URL:www.webrox.ae

这个网站问题是..它打开/index.php和所有菜单项目,如投资组合或雇用我们等它打开名称/ oservices /公共/投资组合..像这样的东西,....

下面是我的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]

谢谢

laravel .htaccess
1个回答
0
投票

改变行

RewriteCond %{REQUEST_URI} !^/oservice/public/ 
RewriteRule ^(/)?$ webrox.ae/index.php [L]

RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^(/)?$ webrox.ae [L]

并添加该行

RewriteRule ^ index.php [L]
© www.soinside.com 2019 - 2024. All rights reserved.