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
Apache 迁移后重写规则不起作用_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Apache 迁移后重写规则不起作用

Apache 迁移后重写规则不起作用,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我在服务器上有一个.htaccess文件: RewriteEngine on Options +SymLinksIfOwnerMatch RewriteRule ^machine/register.* register.php <Files .htaccess> order allow,deny deny from all </Files> 我在register.php上检查了文件权限,它与其他文件属于同一所有者,拥有666权限。这里有什么问题?问题是配置有以下内容: <D

我在服务器上有一个
.htaccess
文件:

RewriteEngine on Options +SymLinksIfOwnerMatch RewriteRule ^machine/register.* register.php <Files .htaccess> order allow,deny deny from all </Files>
我在
register.php
上检查了文件权限,它与其他文件属于同一所有者,拥有666权限。这里有什么问题?

问题是配置有以下内容:

<Directory ...path> Options Indexes FollowSymLinks MultiViews AllowOverride None </Directory> 选项索引跟随符号链接多视图 不允许超限 我将此更改为:

选项索引跟随符号链接多视图 允许超越所有
它成功了。如果其他人遇到这个问题,我会把它留在这里。

你的htaccess文件在哪里?在文件夹的目录中你是指
机器
文件夹还是文档根目录?register.php文件也在文档根目录中?是的,它也在那里 <Directory ...path> Options Indexes FollowSymLinks MultiViews AllowOverride None </Directory> <Directory ...path> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory>