所以我把它重写为.html给.php,但是当它需要时它不会加载.html文件。有没有办法让它忽略书店目录?我以为我已经在那里,但它不起作用。.htaccess允许.html
/public_html/.htaccess
Options +FollowSymlinks
DirectoryIndex index.php index.html index.htm
RewriteEngine on
RewriteCond %{REQUEST_URI} "/bookstore/"
RewriteRule ^(.+)\.html$ http://virtualbookworm.com/$1.php [L]
ErrorDocument 404 /error.php
../bookstore/.htaccess
Options +FollowSymlinks
DirectoryIndex index.php index.html index.htm
Options +Indexes
ErrorDocument 404 /error.php
注意,'!-f'告诉mod_rewrite忽略任何实际存在的文件并将它们从重写中排除。 – 2012-08-13 19:25:28
@MarcB:刚刚添加这个:)谢谢指出:) – 2012-08-13 19:28:27