Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12461

Reply To: Redirect WordPress Website and Still Allow Login

$
0
0

But actually if your URL structure is identical on both the old site and the new site then this code below works fine without doing anything else or adding any additional code in your root .htaccess file on the old site.  If your URL structure is not the same then what happens is the backreference $ will rewrite the URL name of a post on the old site to the new site.

Example:  oldsite/post-10 with rewrite to the new site as this:  newsite/post-10.  If the URL /post-10 does not actually exist on the newsite then a 404 error will occur on the newsite.

If this code is not working on your site correctly then there is a mistake somewhere.

# 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
  • This reply was modified 14 hours, 51 minutes ago by Avatar of AITpro Admin AITpro Admin.
  • This reply was modified 14 hours, 43 minutes ago by Avatar of AITpro Admin AITpro Admin.

Viewing all articles
Browse latest Browse all 12461

Trending Articles