Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess重写URL而不是重定向_.htaccess_Mod Rewrite_Url Rewriting - Fatal编程技术网

.htaccess重写URL而不是重定向

.htaccess重写URL而不是重定向,.htaccess,mod-rewrite,url-rewriting,.htaccess,Mod Rewrite,Url Rewriting,是否可以在不重定向的情况下进行此重写 # 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

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

# 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]

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

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

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

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

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

是否有办法检查是否启用了此功能?类似于:
您可以使用
phpinfo()进行检查输出。是的,不允许这样做(服务器上的安全问题,人们得到tmi)另一方面,这确实有效。。。但是,该博客是wordpress.com博客,不是自托管的,因此它会导致脚本/图像/css加载错误。。。啊,好吧,回到绘图板上来。谢谢你的帮助!不客气。是的,我知道,您可以在您控制的主机上启用mod_代理。有没有办法检查是否已启用?类似于:
您可以使用
phpinfo()进行检查输出。是的,不允许这样做(服务器上的安全问题,人们得到tmi)另一方面,这确实有效。。。但是,该博客是wordpress.com博客,不是自托管的,因此它会导致脚本/图像/css加载错误。。。啊,好吧,回到绘图板上来。谢谢你的帮助!不客气。是的,我知道,您可以在您控制的主机上启用mod_代理。