Jump to content

301 redirect in dinamic web pages


ebchost

Recommended Posts

Can you help me with this ?

 

when i check my seo, i recive this message:

Permanent Redirect Not Found

Search engines may think www.sportskevesti.co and sportskevesti.co are two different sites.You should set up a permanent redirect (technically called a "301 redirect") between these sites. Once you do that, you will get full search engine credit for your work on these sites.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/251170-301-redirect-in-dinamic-web-pages/
Share on other sites

In the eyes of a search engine, "www.sportskevesti.co" and "sportskevesti.co" are not the same. You need to decided whether you want to include "www." or not, then force that decision by redirecting users when they try and access the wrong one. You can do this at the Apache level, either in a ".htaccess" file within your web root or within the main Apache config file.

 

Add this rewrite rule to remove www:

 

RewriteCond %{HTTP_HOST}   ^www.sportskevesti.co$ [NC]
RewriteRule ^/(.*)         http://sportskevesti.co/$1 [L, R=permanent]

 

Add this one to add it:

 

RewriteCond %{HTTP_HOST}   !^www.sportskevesti.co$ [NC]
RewriteRule ^/(.*)         http://www.sportskevesti.co/$1 [L, R=permanent]

i can not access to apach config file from cpanel

 

when i paste first or second code in htaccess file, i can not load www.sportskevesti.co or sportskevesti.co (i have error message)

 

 

Add this rewrite rule to remove www:

 

RewriteCond %{HTTP_HOST}   ^www.sportskevesti.co$ [NC]
RewriteRule ^/(.*)         http://sportskevesti.co/$1 [L, R=permanent]

 

Add this one to add it:

 

RewriteCond %{HTTP_HOST}   !^www.sportskevesti.co$ [NC]
RewriteRule ^/(.*)         http://www.sportskevesti.co/$1 [L, R=permanent]

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.