Mobile app version of vmapp.org
Login or Join
Si4351233

: Try putting these rules in your .htacccess file: RewriteEngine on Options +FollowSymlinks -MultiViews # handles http redirect RewriteCond %{SERVER_PORT} =80 RewriteCond %{HTTP_HOST} ^beta.mysite.com$

@Si4351233

Try putting these rules in your .htacccess file:

RewriteEngine on
Options +FollowSymlinks -MultiViews

# handles http redirect
RewriteCond %{SERVER_PORT} =80
RewriteCond %{HTTP_HOST} ^beta.mysite.com$ [NC]
RewriteRule ^/?(.*)$ www.mysite.com/ [R=301,L,QSA,NE]

# handles https redirect
RewriteCond %{SERVER_PORT} =443
RewriteCond %{HTTP_HOST} ^beta.mysite.com$ [NC]
RewriteRule ^/?(.*)$ www.mysite.com/ [R=301,L,QSA,NE]


R=301 will redirect with https status 301

L will make last rule

NE is for no escaping query string

QSA will append your existing query parameters

is your REQUEST_URI

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme