Home › Forums › BulletProof Security Free › Redirect WordPress Website and Still Allow Login
Tagged: Allow Login, Redirect WordPress, wp-admin
- This topic has 25 replies, 4 voices, and was last updated 4 years, 11 months ago by Alex Laxton.
-
AuthorPosts
-
RickParticipant
I really appreciate the response on this support issue. However, it’s not the solution I am looking for. I already have the redirect setup and functioning correctly however, I want to be able to access the OLD domains WordPress dashboard. I need to know what code I need to add to be able to access the OLD WordPress dashboard.
This is what I have now.
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
What do I need to add to it to be able to access the OLD WordPress dashboard.
Thank you again for your help
AITpro AdminKeymasterWe need to know more information before we can provide an answer. Please explain the entire scenario in detail.
Example:
My WordPress installation type is a Standard/Single WordPress installation or Network/Multisite or Giving WordPress it’s Own Directory (GWIOD)
I had an old WordPress site here abc.com.
I then did X and I can no longer access my current site Dashboard.
What does this mean – “…it is functioning correctly” but then you state that you cannot access your WordPress Dashboard so obviously it is not really functioning correctly. Please explain with as much specific details as possible and post examples.RickParticipantOk you have site 1 OLD domain
You have site 2 NEW domain
OLD site 1 has the redirect on it and directing now to NEW site 2 and working correctly.
How do I access the OLD site dashboard? On the old domain without it redirecting me to the NEW site 2 domain?
I thought I was clear but I guess it left questions open. Sorry for the confusion.AITpro AdminKeymasterAh got it. Now I understand the question. The condition says if the Request URI is NOT /wp-admin/ then redirect to the other site.
This code has issues/problems – see end of this Forum Topic for working code.
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} !^/wp-admin/ [NC] RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
AITpro AdminKeymasterActually remove the trailing slash after wp-admin since it may cause a problem.
This code has issues/problems – see end of this Forum Topic for working code.
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} !^/wp-admin [NC] RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
RickParticipantYeah, that is not working. 🙁
RickParticipantOne thing I noticed it is in the addresss bar it is showing a redirect url but in the end where the destination url is it had many different chars in there than forward slashes after the http
%253A%252F%252F
and before the%253A%252F%252F
wp-adminAITpro AdminKeymasterThis code works on our testing site, but of course on logout WordPress does its own redirect to wp-login.php so unless you added some additional conditions then the logout (wp-login.php) will redirect to the other site. You can just close your Browser window and not log out of the old site.
This code has issues/problems – see end of this Forum Topic for working code.
# WP REWRITE LOOP START RewriteEngine On RewriteBase /wordpress-testing-website/ RewriteCond %{REQUEST_URI} !^/wp-admin [NC] RewriteRule (.*) http://www.ait-pro.com/$1 [R=301,L] # WP REWRITE LOOP END
AITpro AdminKeymasterYou would need to go directly to this URL in your Browser window: yourSite.com/wp-admin/ unless you want to create additional conditions. If something on the old site is redirecting you somewhere else other than /wp-admin/ when you go directly to /wp-admin/ then you will have to create additional conditions for that other redirect.
RickParticipantAre you saying the below should work? Take note where I inserted newsite. And this would direct me to the OLD site wp-admin login? Or do I need something differet? Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} !^/wp-admin [NC] RewriteRule (.*) http://www.NEWSITE.com/$1 [R=301,L]
AITpro AdminKeymasterActually I found a problem with the code I posted above. This code works for any WordPress redirects from wp-admin to wp-login or directly accessing wp-login.php.
What the condition / rule says is do NOT redirect to the new site if the URI/URL is either /wp-admin or wp-login.php. All other URI’s/URL’s will be redirected to the new site except for /wp-admin and wp-login.php.
# WP REWRITE LOOP START RewriteEngine On RewriteBase /wordpress-testing-website/ RewriteCond %{REQUEST_URI} !^(/wp-admin|.*wp-login\.php.*) [NC] RewriteRule (.*) http://www.ait-pro.com/$1 [R=301,L] # WP REWRITE LOOP END
RickParticipantOk, I get where to place the NEWSITE url but what do I insert where you have rewritebase?
I appreciate all your help with this.
AITpro AdminKeymasterIf you have a Root WordPress installation then the RewriteBase is /
If you have a Subfolder WordPress installation then the RewriteBase is the name of the folder where WordPress is installed.The ait-pro.com website is a Root WordPress installation = RewriteBase /
The ait-pro.com/wordpress-testing-website/ is a Subfolder WordPress installation = RewriteBase /wordpress-testing-website/RickParticipantThat does work and thank you very much for all your help.
The only thing I notice is when inside the OLD dashboard it keeps making reference to the NEW Domain down in the status bar of the browser. Like it keeps searching for the new website domain. I am assuming this is just a loop of sorts and nothing to worry about.
Thank you again I appreciate it very much.
AITpro AdminKeymasterNot sure what you mean by “status bar of the Browser”, but if everything is working the way you want it to work then just ignore whatever that is.
-
AuthorPosts
- You must be logged in to reply to this topic.