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
.htaccess 我想在现有的.htacess文件中添加URL。。但当我添加新的时,它不起作用_.htaccess - Fatal编程技术网

.htaccess 我想在现有的.htacess文件中添加URL。。但当我添加新的时,它不起作用

.htaccess 我想在现有的.htacess文件中添加URL。。但当我添加新的时,它不起作用,.htaccess,.htaccess,下面是我的.htacess文件代码,运行良好 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfMo

下面是我的.htacess文件代码,运行良好

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

请告诉我在何处以及如何添加此新规则,以使其正常工作

您是如何定义服务器配置/虚拟主机的?文档根是什么?你到底在哪里添加此规则?我正在将其添加到我的子域中。实际上这是hostgator服务器,我为我的子域启用了.htaccess。。他们将.htaccess ifmodule代码添加到.htaccess文件中。但是,当我添加规则时,它的工作方式与您在上面发布的
.htaccess
文件没有什么不同那在哪里?.htacess文件在根文件夹上。。。
RewriteRule ^([\w-]+)/([\w-]+)/([\w-]+)/([\w-]+)/([\w-]+)/([\w-]+).html?$ detail-page.php?network=$1&country=$2&category=$3&subcategory=$4&package_id=$5    [QSA,L]