301 redirect on windows server
-
stinkybee
- Posts: 4
- Joined: Thu Apr 07, 2005 8:34 am
- Contact:
301 redirect on windows server
I have a domain name aliased to another domain, this is causing search engine problems and I have been advised ot change it to a 301 re-direct. My hosting company say that they can not do this but have not given an explaination as to why. Can anyone explain this?
Also, I understand you can use ASP code to issue a 301 redirect under a windows server but will this work if you have to check which domain the user has come from. I can not put the code in a page that is on the aliased domain as it is only a domain and has no web space, the only way to do this would be to check which domain the user came in on and redirect if it is the aliased one. The problem here is whether the search engines will recognise this as a 301 redirect. Does anyone know?
Also, I understand you can use ASP code to issue a 301 redirect under a windows server but will this work if you have to check which domain the user has come from. I can not put the code in a page that is on the aliased domain as it is only a domain and has no web space, the only way to do this would be to check which domain the user came in on and redirect if it is the aliased one. The problem here is whether the search engines will recognise this as a 301 redirect. Does anyone know?
David Herbert
-
stinkybee
- Posts: 4
- Joined: Thu Apr 07, 2005 8:34 am
- Contact:
-
stinkybee
- Posts: 4
- Joined: Thu Apr 07, 2005 8:34 am
- Contact:
-
TravelandHoliday
- Posts: 105
- Joined: Mon Nov 13, 2006 8:41 am
- Location: USA
- Contact:
-
Stella
- Posts: 13
- Joined: Mon Nov 27, 2006 5:30 pm
- Contact:
Try this code into htaccess file:
This will redirect all URL's to the domain www and redirect the PR and indexing at some point.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301]
</IfModule>
hope this helps.
This will redirect all URL's to the domain www and redirect the PR and indexing at some point.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301]
</IfModule>
hope this helps.
[url=http://www.bjgyt.com]Business[/url] [url=http://www.dirwizard.com]Directory[/url]
-
porov
- Posts: 17
- Joined: Thu Dec 14, 2006 1:36 pm
- Contact:
-
clearwriter
- Posts: 83
- Joined: Sun Mar 23, 2008 3:59 am
- Contact:
-
bikini tv
- Posts: 7
- Joined: Tue Aug 05, 2008 2:39 am
- Contact:
-
guruananth
- Posts: 172
- Joined: Sat Jul 26, 2008 4:11 am
- Contact:
301 redirect using script will give the same page rank to newly modified site.you can try with PHP javascript code
_____________________________________
http://www.cannyinfotech.com/mobile.html
_____________________________________
http://www.cannyinfotech.com/mobile.html
-
jewelora20
- Posts: 4
- Joined: Fri Nov 12, 2010 11:08 pm
- Contact:
Re: 301 redirect on windows server
hello!!Great Stuff! Thanks for the good info. Cheers!
Who is online
Users browsing this forum: No registered users and 52 guests