Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.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 .htaccess文件-webhotel不支持AllowOveride_Php_Apache_.htaccess - Fatal编程技术网

Php .htaccess文件-webhotel不支持AllowOveride

Php .htaccess文件-webhotel不支持AllowOveride,php,apache,.htaccess,Php,Apache,.htaccess,我遇到了一个问题,因为我试图用我的.htaccess文件重写一些URL。我刚开始使用.htaccess文件,所以我不知道这个问题的答案是否显而易见,但我昨天四处询问,他们告诉我需要将AllowVeride设置为ALL,我的.htaccess文件才能工作 问题是my webhotel不支持用户访问低于domain root/domain.com/的根文件夹 有没有办法绕过.htaccess文件将URL转换为友好的 例如,我的代码如下所示 Options +FollowSymLinks Rewri

我遇到了一个问题,因为我试图用我的.htaccess文件重写一些URL。我刚开始使用.htaccess文件,所以我不知道这个问题的答案是否显而易见,但我昨天四处询问,他们告诉我需要将AllowVeride设置为ALL,我的.htaccess文件才能工作

问题是my webhotel不支持用户访问低于domain root/domain.com/的根文件夹

有没有办法绕过.htaccess文件将URL转换为友好的

例如,我的代码如下所示

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.domain\.dk$ [NC]

ErrorDocument 400 /?fejl=400

ErrorDocument 401 /?fejl=401

ErrorDocument 403 /?fejl=403

ErrorDocument 404 /?fejl=404

ErrorDocument 500 /?fejl=500

RewriteRule fag/(.*)/aflevering/(.*)/ index.php?fag=$1&id=$2
RewriteRule fag/(.*)/ index.php?fag=$1
RewriteRule aflevering/(.*)/ index.php?id=$2

您需要在apache配置中设置AllowOverride,如果您没有访问权限,请让您的主机这样做以允许使用.htaccess。如果他们找不到新的主持人,好的,谢谢。他们不会,所以我现在换主持人。这么差的服务。。。主持人