字preSS - 重定向所有页面到其他域和异常的主页和可湿性粉剂管理员可湿性、粉剂、重定向、异常

2023-09-02 01:01:44 作者:狂妄称帝

我需要使用Word preSS重定向帮助。我认为,最简单的方法就是让这个与htaccess文件。 我想301重定向从我的网站www.domain.com所有网页子域web.domain.com,但我希望有例外的主页www.domain.com,并在www.domain.com/wp字preSS管理-admin / ...和www.domain.com/wp-login.php

我有基本的单词preSS htaccess的设置:

 < IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteBase /
重写规则^指数 .PHP $  -  [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则。的index.php [L]
< / IfModule>
 

解决方案

感谢您的帮助 - 我发现,我需要两个WP管理员,所以我使这个设置:

  RewriteEngine叙述上
的RewriteCond%{REQUEST_URI}!/ $
的RewriteCond%{REQUEST_URI}!/ wpinstall(/.*)$
重写规则(。*)http://web.domain.cz/$1 [R = 301,QSA]
 

和我安装可湿性粉剂到子文件夹wpinstall

,C 运行异常 Press retry to debug the application

I need help with WordPress redirect. I think, that the simplest way is make this with htaccess file. I want 301 redirect all pages from my site www.domain.com to subdomain web.domain.com, but I want have exception for homepage www.domain.com and for wordpress admin in www.domain.com/wp-admin/... and www.domain.com/wp-login.php

I have the basic wordpress htaccess settings:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

解决方案

Thanks for your help - I find, that I need both wp admin so I make this settings:

RewriteEngine on    
RewriteCond %{REQUEST_URI} !/$    
RewriteCond %{REQUEST_URI} !/wpinstall(/.*)$    
RewriteRule (.*) http://web.domain.cz/$1 [R=301,QSA]

And I install wp to subfolder wpinstall