Redirection 301 Htacces

1

A client at first wanted his web page to show / shop at the end of his url, now he wants it not to show it, he has this in his account that I put at the beginning. Your hosting is shared, you have the web in a folder / shop and the url of the domain www.dominio.com parked to that folder

RewriteCond %{HTTP_HOST} ^dominio\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.dominio\.com$
RewriteRule ^/?$ "http\:\/\/dominio\.com\/shop\/" [R=301,L]

How would you remove the redirection that shows / shop / in the url and that does not affect the indexed urls?

RewriteRule ^/?$ "http\:\/\/dominio\.com\/shop\/" [R=301,L]

Should it be like this?

RewriteRule ^/?$ "http\:\/\/dominio\.com\/" [R=301,L]

or delete the RewriteRule and add

Redirect 301 /shop http://www.dominio.com/
    
asked by Nuvo DW 08.08.2016 в 07:01
source

1 answer

0

NOTE: If your page is still not in use, just remove the RewriteRule

Now, if you already have some weight gained in search engines, to keep it the best option is the 2nd: do a redirect 301.

Translated from HERE

  

Redirect 301 redirect is the most efficient and compatible method with search engines for web redirects. It is not difficult to implement and preserve positions in the search engines of each page in particular. If you have to change filenames or move pages, this is the safest option. Code 301 is interpreted as "permanently moved.

On the other hand, RewriteRule is used precisely for that, to overwrite existing urls with another address, it does not influence if you want to keep the weight of the url in the search engines and let's say it creates a kind of alias that will take weight own.

    
answered by 08.08.2016 в 13:34