Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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 修改重写EC2_Php_Apache_Mod Rewrite_Amazon Ec2 - Fatal编程技术网

Php 修改重写EC2

Php 修改重写EC2,php,apache,mod-rewrite,amazon-ec2,Php,Apache,Mod Rewrite,Amazon Ec2,我已经按照另一篇SO帖子中的说明在EC2上启用了mod_rewrite。我有以下设置: # Configure /var/www/html <Directory "/var/www/html"> Options FollowSymLinks AllowOverride All DirectoryIndex index.html index.php Order allow,deny Allow from all </Directory>

我已经按照另一篇SO帖子中的说明在EC2上启用了
mod_rewrite
。我有以下设置:

# Configure /var/www/html
<Directory "/var/www/html">
    Options FollowSymLinks
    AllowOverride All
    DirectoryIndex index.html index.php
    Order allow,deny
    Allow from all
</Directory>

RewriteEngine on

RewriteRule ^/?jobs$ jobs.html [L]
#配置/var/www/html
选项如下符号链接
允许超越所有
DirectoryIndex.html index.php
命令允许,拒绝
通融
重新启动发动机
重写规则^/?jobs$jobs.html[L]

然而,当我访问时,它无法重写。我已经使用phpinfo()进行了检查,并且在PHP中启用了mod_rewrite。还有什么可以阻止重写?

此链接将帮助您遵守这些说明,这使我达到了上述要点,但重写功能不起作用。请将您的.htaccess移到您的项目文件夹中。试着。。