开发者

Redirection using HTACCESS is working fine on the server but not on the Sub Domain

开发者 https://www.devze.com 2023-01-02 02:20 出处:网络
Redirection using HTACCESS is working fine on the server but not on the Sub Domain. I used the following HTACCESS code for the redirection task:

Redirection using HTACCESS is working fine on the server but not on the Sub Domain. I used the following HTACCESS code for the redirection task:

Options +FollowSymlinks
RewriteEngine On 
RewriteRule ^user/(.+)$ done.php?inf开发者_JAVA百科o=$1

http://site.com/user/123/USA to http://site.com/done.php?info=123/USA

Does any changes needed on the Sub Domains to work this HTACCESS code?

http://test.site.com/user/123/USA to http://test.site.com/done.php?info=123/USA


It wholly depends on the exact configuration of the subdomain. It might be as easy as changing this:

RewriteRule ^user/(.+)$ done.php?info=$1

into this:

RewriteRule ^/?user/(.+)$ done.php?info=$1

But without the server configuration it's hard to tell. I'd say enable RewriteLog (cannot be done in .htaccess), check it's output, and if still unclear report back with the differences in configuration between domain & subdomain.

0

精彩评论

暂无评论...
验证码 换一张
取 消