以下是我的apache conf文件的内容。我期待以下行为: -
有人可以就我的错误做出反馈。据我所知,RewriteRule是上下文感知的,这些应该按预期工作。
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/mylocalhost"
ServerName www.mywebsite
# Other directives here
RewriteEngine on
RewriteRule ^/google$ http://www.google.com/ [R]
</VirtualHost>
Alias /somecode "C:/somecodedir/"
<Directory "C:/somecodedir/">
RewriteEngine on
RewriteRule ^/google$ http://www.yahoo.com/ [R]
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
答案 0 :(得分:0)