1

是否可以在不重定向的情况下进行重写?

# redirect for the blog link
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^topgearsblog/?$ http://aerogearblog.wordpress.com/ [NC,L]

我试过这样:

# redirect for the blog link
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^topgearsblog/?$ http://myblog.wordpress.com/ [L,QSA,NC]

它仍然重定向而不是重写。

4

1 回答 1

1

只有在 Apache 配置中启用mod_proxy才可能。启用后,您可以执行以下操作:

# redirect for the blog link
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^topgearsblog/?$ http://aerogearblog.wordpress.com/ [NC,L,P]
于 2013-06-14T16:54:24.350 回答