FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


301 Redirect





medesignz
I've been trying to get a 301 redirect sorted, using PHP, .htaccess and WP plugin but the site checkers are all saying I dont have one in place.

What am I doing wrong?
tdossi
Solutions for search engine optimization:
the 301-width line means: Moved Permanently status
Why google is expected from a correct forwarding

Are reasons to have to set up forwarding it a number, for example:

A company has several domains on the server:
www.page.ch, www.page.at www.page.de, etc.

For business communications, all domains required for search engines, they become a problem if all domains have been equipped with the same content as they are repeatedly registered and processed. The user would be displayed like this in the result more and more links with duplicate content. Such redundancy may not even Google

Google says in this case from a duplicate content problem, and evaluates such sites in the rankings from mercilessly.
The solution:
Thanks to a 301 redirect, the website is accessed only once

The permanent redirection with htaccess file can be realized which is placed into the root directory of the web server - but this is the PHP module mod_rewrite needs. - May appeal to the provider.

When mod_rewrite is active, the 301 redirect for example, can be written using a regular expression like this:

Several domains have the same IP address multiple domains, but want to access the Internet can www.page.de

RewriteEngine on
RewriteCond% {HTTP_HOST}! Www \. Example page \. Com $ [NC]
RewriteRule ^ (. *) $ Http:// \. For page \. En / $ 1 [R = 301, L]

No-www problem: Often, Internet portals are called both "www" and without "www". This ensteht a duplicate content problem, then, should the site with "" callable.

RewriteEngine on
RewriteCond% {HTTP_HOST} ^ www \. example page \. de [NC]
RewriteRule ^ (. *) http://www \. for page \. en / $ 1 [R = 301, L]

Note: In the final analysis must be adjusted by htaccess redirects the server configuration. This is done in the configuration file of Apache server (Linux) httpd.conf
- Access is usually only an administrator in the company or the responsible provider. If you have problems then please ask there.
Plan B: A 301 redirect with php

If partout can not set up htaccess file, there is the possibility of webcasting with PHP function to realize "header". The following code belongs in the index files of all domains to be redirected:

<Php

header ("HTTP/1.1 301 Moved Permanently");

header ("Location: http://www.page.de");

header ("Connection: close");

?>

If necessary, could be a particular domain to be umgleitet, specifically query:

<Php

if ($ _SERVER ['HTTP_HOST'] = "www.page.at") {

header ("HTTP/1.1 301 Moved Permanently");

header (. "Location: http://www.page.de" $ _SERVER ['REQUEST_URI']); exit;}

?>

Another advantage is that the PageRank is transferred to a 301 redirect
Examination of the 301 redirect on the Internet

Whether a transmission output correctly as 301, let's use the following link to verify http://web-sniffer.net/ very well.

Just enter the forwarding address to the result and the destination address will be announced soon
medesignz
Thanks for your post... It wasnt very relevant to my predicament tho Very Happy
Related topics
301 Redirect for blogger?
.htaccess redirect?
301 Redirection
Redirect Error
Permanent Redirect Not Found on http://website.grader.com
301 redirection in PHP and .htaccess
Non–www and www Redirect – What Method?
Auto redirect your visitors to a different page
Google and Domains: help
301 permanent redirect possible?
Adding a new domain
htaccess
Just bough www.fantasy-pc.com need help !!!!
Using Canonical Domains to Sabotage Competitors in Google
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> SEO and Search Engines

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.