We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Auto redirect in .htaccess | Forum

Topic location: Forum home » Support » General Questions
mahmood
mahmood Sep 15 '18

I want to set *an always* redirect from an old URL to a new URL. I have written this in the old server .htaccess file


RewriteEngine On

RewriteCond %{HTTP_HOST} ^oldserver\.com

RewriteRule ^(.*)$ https://sn.newserver.com/$1 [R,L]
Redirect /index.php https://sn.newserver.com/


But it doesn't work. Any idea?


The Forum post is edited by mahmood Sep 15 '18
mahmood
mahmood Sep 15 '18

Anyway, I have to use


RewriteCond%{SERVER_PORT}80

RewriteRule^(.*)https://sn.newserver.com/$1 [R,L]

The Forum post is edited by mahmood Sep 15 '18