Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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规则以覆盖友好url行为_.htaccess - Fatal编程技术网

.htaccess规则以覆盖友好url行为

.htaccess规则以覆盖友好url行为,.htaccess,.htaccess,我使用的是一个名为Vivvo的CMS,Vivvo默认附带一个.htaccess文件,其中包含以下规则: RewriteEngine On RewriteRule ^sitemap\.xml$ index.php [L] RewriteRule ^(.*)(\.html|\.htm)$ index.php [L] RewriteRule ^(.*)(\.rss|\.atom|\.txt)$ index.php [L] RewriteCond %{REQUEST_FILENAME} !-f Rew

我使用的是一个名为Vivvo的CMS,Vivvo默认附带一个.htaccess文件,其中包含以下规则:

RewriteEngine On

RewriteRule ^sitemap\.xml$ index.php [L]
RewriteRule ^(.*)(\.html|\.htm)$ index.php [L]
RewriteRule ^(.*)(\.rss|\.atom|\.txt)$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php [L]
在我的webroot中有一个名为
book/
的文件夹,我需要从外部访问它。但是,每当我键入www.mydomain.com/book时,vivvo就会将我发送到定制的404错误页面

为了让web服务器忽略“RewriteCond”并让用户转到正确的目录,我可以使用什么规则

我试过了,但没有成功:

 RewriteRule book/ book/index.php [L]
试试这个:

RewriteEngine on

RewriteCond %{REQUEST_URI} "/book/"
RewriteRule (.*) $1 [L]
# the rest of your rules...