Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
418 views
in Technique[技术] by (71.8m points)

wordpress - 从htaccess重写规则中排除页面(Exlude a page from htaccess Rewrite rule)

I've a WordPress install where I have redirected all pages (except the wp-admin and wp-login) to a different url.

(我安装了WordPress,已将所有页面(wp-admin和wp-login除外)重定向到另一个URL。)

I want to exclude one page (called /your-login) from being redirected.

(我想从重定向中排除一页(称为/ your-login)。)

This page is in effect the wp-admin page where the login slug has been changed.

(该页面实际上是已更改登录名的wp-admin页面。)

How can i exlude this page from being redirected in the htaccess file?

(如何排除此页面在htaccess文件中的重定向?)

The current code i'm using to perform the redirects in the htaccess file is:

(我正在执行htaccess文件中的重定向的当前代码是:)

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^(/wp-admin|. wp-login.php. ) [NC] RewriteRule (.*) https://mywebsite.co.uk/ $1 [R=301,L]

(RewriteEngine On RewriteBase / RewriteCond%{REQUEST_URI}!^(/ wp-admin |。wp -login.php。 )[NC] RewriteRule(。*) https://mywebsite.co.uk/ $ 1 [R = 301,L ])

where mywebsite.co.uk would be the site being redirected to.

(mywebsite.co.uk将被重定向到的站点。)

Thanks!

(谢谢!)

  ask by Stephen Norman translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...