httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel González <miguel_3_gonza...@yahoo.es.INVALID>
Subject [users@httpd] rewrite in .htaccess
Date Tue, 24 May 2016 10:06:12 GMT
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message