I have a http://www.nz-lifestyle.com/beta/ website which runs on http://www.nz-lifestyle.com/ live site also but I want to redirect the beta site live site when any user visit to beta site.
Can you please provide the htaccess rule for the same?
Thanks
Try this in .htaccess
Redirect 301 /beta/ /
OR
RewriteEngine on
RewriteBase /
RewriteRule ^standard-business-cards/$ http://%{HTTP_HOST}/ [R=permanent,L]
Related
My website got a new domain yesterday.
Old: plejadium.de (SSL)
New: lucyda.de (SSL)
To redirect all URLs from old to new I wrote this into my .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^plejadium\.de$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.plejadium\.de$ [NC]
RewriteRule ^(.*)$ https://www.lucyda.de/$1 [L,R=301]
</IfModule>
Testing some search engine result URLs and they redirect properly to the new domain.
Now I'd like to use the site moving tool on Google Search Console to make Google aware of the new domain.
But GSC says the starting page as well as some random URLs from my website don't have a 301 redirect, like for example:
https://www.plejadium.de/
https://www.plejadium.de/virtual-life/karten-gis/google-maps-mit-gpx-und-kml/
So I can't perform the site URL movement on Search Console and am afraid to lose all rankings.
In another Stackoverflow topic I read that there must be 301 redirects for every combination like with www and without and with https and without. www is covered in the .htaccess but I don't have any clue how to get that https thing done, because that's it what Google Search Console struggles with obvisiously.
As you might assume I'm not experienced with .htacces and got the Rewrite thing from a help blog.
Can someone help?
Please help me to redirect my testing site to root website via htaccess rules. I want to redirect https://example.com/staging/ to https://example.com/
Redirect https://example.com/staging/ ~ https://example.com
Thanks
Hi #webesters please try this code in htaccess file of your root directory
RewriteEngine On
RewriteRule ^staging/(.*)$ /$1 [L,NC,R=302,NE]
I am looking for a 301 redirect. I have a OC 1.5.1.3 (abc.com) and have a new store now on OC 2.0.3.1 (xyz.com ). I have migrated my data from abc.com to xyz.com and since all the product / pages urls are the same except the domain change, i am looking for a simple code which i can add to htaccess to make this happen.
Since my old website urls are listed on Google, i would like to redirect the traffic coming to a particular url to the same page on the new website. It would be a permanent redirect.
I paid a freelancer to get this done.. was in a hurry. Anyways, i have posted the answer below for the benefit of all.
Upload this to .htaccess on your old domain abc.com, replace example.com with your new domain name.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !example.com/$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
I need to permanently redirect my old mobile site m.sdppm.com to https://www.sdppm.com using .htaccess. The reason being, I now have a responsive mobile friendly site and no longer need the m.sdppm.com site. Does anyone know how to do this?
Just add this simple rule to your .htaccess placed in your website's root directory.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^m\.sdppm\.com$ [NC]
RewriteRule ^ https://www.sdppm.com%{REQUEST_URI} [R=301,L]
As you can tell, the rule checks if %{HTTP_HOST} matches your old mobile site and redirects.
I created a Wordpress blog on http://staging.mydomain.com and now that the website is ready i want all the pages to point to http://www.mydomain.com . I configured Wordpress to do that,the problem is that Google already index http://staging.mydomain.com articles and i want the pages to redirect to http://www.mydomain.com/Name-of-the-article
I search around and found that I need to do a 301 redirection via a htaccess but I don't know what to write.
Thank you for taking the time to read my answer.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^staging.mydomain.com$
RewriteRule ^(.*)$ http://mydomain.com/$1 [R=permanent,L]