Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/270.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
Php 我的azure虚拟机上的laravel pretty url问题_Php_Apache_.htaccess_Azure_Mod Rewrite - Fatal编程技术网

Php 我的azure虚拟机上的laravel pretty url问题

Php 我的azure虚拟机上的laravel pretty url问题,php,apache,.htaccess,azure,mod-rewrite,Php,Apache,.htaccess,Azure,Mod Rewrite,我已经在我的azure vm/public文件夹中添加了.htaccess文件,如laravel 4.2文档所述 Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] …我已经启用了mod_rewrite模块,但仍然没有任何进展@what work is please我

我已经在我的azure vm
/public
文件夹中添加了.htaccess文件,如laravel 4.2文档所述

Options +FollowSymLinks RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

…我已经启用了
mod_rewrite
模块,但仍然没有任何进展@what work is please我需要您的帮助

我想可能有未配置的东西。我发现你也有同样的问题

总的来说, 这将更改所有网站的
AllowOverride
值。在您的httpd.conf文件中,查找主
指令:


...
不允许超限
...

只需将其更改为:


...
允许超越所有
...


我将
AllowOverride
从“All”修改为“None”,并成功复制了您的问题。所以我认为这是您问题的关键。

可能是apache没有使用
.htaccess
文件

要进行测试,请添加类似于
Redirect 301/http://google.com/
转到
.htaccess
的开头,查看当您访问站点时它是否重定向到那里


如果无法确保您的
配置具有
允许覆盖所有
。这指示apache使用/epresent
.htaccess
。默认值通常为
AllowOverride None

感谢这项工作,我已经设置了AllowOverride All httpd.conf文件,使其正常工作。