Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 在共享主机上部署Laravel 5.2错误,显示example.com/example.com_.htaccess_Laravel_Configuration_Server - Fatal编程技术网

.htaccess 在共享主机上部署Laravel 5.2错误,显示example.com/example.com

.htaccess 在共享主机上部署Laravel 5.2错误,显示example.com/example.com,.htaccess,laravel,configuration,server,.htaccess,Laravel,Configuration,Server,上面是我的.htaccess文件,它在Godaddy服务器上运行良好。但是在ShweHosting(共享主机)上,当使用home(根路由)时,它会自动重定向到example.com/example.com。i、 e.当我想去example.com时,它会去example.com/example.com。我的配置有问题吗?上述错误已解决。该问题是由默认的Cpanel重定向函数和.htaccess引起的。它们不会因为某种原因而覆盖 RewriteEngine On RewriteCond %{HT

上面是我的
.htaccess
文件,它在Godaddy服务器上运行良好。但是在ShweHosting(共享主机)上,当使用home(根路由)时,它会自动重定向到
example.com/example.com
。i、 e.当我想去
example.com
时,它会去
example.com/example.com
。我的配置有问题吗?

上述错误已解决。该问题是由默认的Cpanel重定向函数和.htaccess引起的。它们不会因为某种原因而覆盖

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^example.com$ [NC,OR] 
RewriteCond %{HTTP_HOST} ^www.example.com$ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ example.com/public/index.php?/$1 [L] 
RewriteCond $1 !^/example.com/