.htaccess规则以覆盖友好url行为
我使用的是一个名为Vivvo的CMS,Vivvo默认附带一个.htaccess文件,其中包含以下规则:.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
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...