: 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$
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
More posts by @Si4351233
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.