不重定向使用.htaccess中的子域 [英] Not redirecting the subdomain using .htaccess
本文介绍了不重定向使用.htaccess中的子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的网站,使用Word preSS和我平时登录为:mydomain.com/wp-admin。我想这是对的子域。 我曾尝试使用以下重写URL来创建一个子域:
I have site which uses wordpress and I usually login as : mydomain.com/wp-admin . I want it to be on the subdomain . I have tried to create a subdomain by using the following rewrite url :
RewriteCond %{HTTP_HOST} ^wp-admin
RewriteCond %{REQUEST_URI} !^/wp-admin
RewriteRule ^(.*)$ wp-admin/$1 [L]
但是,当我试图达到 http://wp-admin.mydomain.com/
A weired页面出来说的错误消息:
But when I am trying to reachhttp://wp-admin.mydomain.com/
a weired page comes out saying an error message :
如果你觉得你已经达到这页错误,请与网站的所有者:
和URL更改为:
http://wp-admin.mydomain.com/cgi-sys/defaultwebpage.cgi
请帮我怎么可能能够创建一个子域。
Please help how could I be able to create a subdomain .
推荐答案
您可以尝试给出一个绝对路径,并执行内部重定向(又名直通)。
You could try to give an absolute path, and to enforce an internal redirect (aka. pass-through).
RewriteRule ^(.*)$ /wp-admin/$1 [PT,L]
^ ^^
这篇关于不重定向使用.htaccess中的子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文