Im trying to move a bunch of rewrite rules from a .htaccess file to a the apache config files, I get no errors and placed this within the VirtualHost section of the sites config file:
<Directory /var/www/da/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
RewriteEngine On
RewriteBase /
开发者_如何转开发 RewriteRule ^botswana/central-kalahari/$ /central-kalahari/ [R=301,L]
</Directory>
Rewrite Rules placed in server config / virtual host context will start with leading slash -- that is one of the differences from .htaccess behaviour. Therefore use this one:
RewriteRule ^/botswana/central-kalahari/$ /central-kalahari/ [R=301,L]
精彩评论