文件.htaccess RewriteRule [英] file .htaccess RewriteRule
问题描述
这是场景:
www.example.com/test_folder
在test_folder中,我正在尝试编写.htaccess文件.
该文件的目的是将所有请求重定向到 www.example.com/test_folder/any_file_or_no_file 到test_folder/public/*
这是我尝试过的:
RewriteEngine on
RewriteRule/test_folder/.*/test_folder/public/$ 1
书面改写不起作用.没有像我期望的那样转发.
1
书面改写不起作用.没有像我期望的那样转发.
会感激不尽.
目前尚不清楚您希望获得什么样的帮助.一切都在这里说明:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html [ ^ ],
http://httpd.apache.org/docs/current/mod/mod_rewrite.html [ ^ ].
-SA
参考: ^ ]
Here is the scenario:
www.example.com/test_folder
in test_folder I am trying to write a .htaccess file.
The purpose of the file would be redirecting all request to www.example.com/test_folder/any_file_or_no_file to test_folder/public/*
This is what I tried:
RewriteEngine on
RewriteRule /test_folder/.* /test_folder/public/$1
Written rewriterule is not working. Not forwarding as I am expecting.
Little help would be appreciated.
1
Written rewriterule is not working. Not forwarding as I am expecting.
Little help would be appreciated.
It''s not clear what kind of help would you expect. Everything is explained here:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html[^],
http://httpd.apache.org/docs/current/mod/mod_rewrite.html[^].
—SA
Refer: How+do+I+redirect+my+site+using+a+.htaccess+file[^]
这篇关于文件.htaccess RewriteRule的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!