是否可以在没有重定向的情况下重写?
# 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]
它仍然会重定向而不是重写。
答案 0 :(得分: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]