Skip to content

Instantly share code, notes, and snippets.

View AlexWebLab's full-sized avatar

Alex AlexWebLab

View GitHub Profile
@AlexWebLab
AlexWebLab / .htaccess
Last active August 16, 2016 09:31
How to permanently redirect all the pages of a WordPress website to a new domain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !.*NEWDOMAIN\.COM$ [NC]
RewriteRule ^(.*)$ http://NEWDOMAIN.COM/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d