rewrite in .htaccess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

  I´m having issues with a migration to a new domain redirecting all
URLs to the new domain.

  My .htaccess looks like this:


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

# END WordPress

RewriteCond %{HTTP_HOST} ^oldomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=302,L]


For the time being I´m using a 302 redirect until I made sure it works.

My main problem is that if I tyope old.domain.com I get redirected to
www.newdomain.com. But if type some sections, I don´t get any redirection:

olddomain.com/team/
olddomain.com/contact/
etc

I have purged the Varnish cache in case there is any issue because the
only section that gets redirected is oldomain.com/wp-admin/ (which is
bypassed by Varnish).


I have Apache 2.4.18 from Cpanel and behind Varnish

Thanks,

Miguel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux