Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/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
Apache 我可以只在内部重写url而不更改地址栏中的url吗?_Apache_Url_Mod Rewrite_Url Rewriting - Fatal编程技术网

Apache 我可以只在内部重写url而不更改地址栏中的url吗?

Apache 我可以只在内部重写url而不更改地址栏中的url吗?,apache,url,mod-rewrite,url-rewriting,Apache,Url,Mod Rewrite,Url Rewriting,我目前正在使用 RewriteRule^(.*)wordpress(.*)$1wp十月/现场$2 在www/wp oct/live/将我的测试安装重新映射到http://localhost/wordpress/ 它完成了这项工作,但它也将地址栏中的url更改为http://localhost/wp-oct/live 有没有办法将url保存在地址栏http://localhost/wordpress/您可能希望为此使用mod\u proxy,而不是重写: <IfModule mod_prox

我目前正在使用

RewriteRule^(.*)wordpress(.*)$1wp十月/现场$2

www/wp oct/live/
将我的测试安装重新映射到
http://localhost/wordpress/

它完成了这项工作,但它也将地址栏中的url更改为
http://localhost/wp-oct/live


有没有办法将url保存在地址栏
http://localhost/wordpress/

您可能希望为此使用
mod\u proxy
,而不是重写:

<IfModule mod_proxy.c>
  ProxyRequests Off

  <proxy *>
    Order deny,allow
    Allow from all
  </proxy>

  ProxyPass /wordpress http://localhost/wp-oct/live
  ProxyPassReverse /wordpress http://localhost/wp-oct/live
</IfModule>

代理请求关闭
命令拒绝,允许
通融
ProxyPass/wordpresshttp://localhost/wp-oct/live
ProxyPassReverse/wordpresshttp://localhost/wp-oct/live