Edited by Randy, 30 July 2007 - 02:19 PM.
To break unintentional links.
SEO Class in Chicago, IL
Learn How To Optimize Your Website on July 26, 2013
High Rankings is offering a 1-day customized SEO training class in Chicago. Class size is limited so please sign-up now if you want in!
Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
301 Vs 302 Redirects And Rankings
#31
Posted 30 July 2007 - 02:10 PM
#32
Posted 30 July 2007 - 02:17 PM
What type of server platform are you on? Unix/Linux or Windows/IIS?
There are also lots of threads about various ways to do redirects down in our redirects forum in the Technology section.
#33
Posted 30 July 2007 - 11:47 PM
Should I post back there or here?
Here it goes... My hosting company says to use a index.php file. So if I put
in my root directory and everything should 301 redirect to www.mydomain.com. Is this correct?
Oh, THANKS again Randy!!!
#34
Posted 31 July 2007 - 04:43 AM
As it stands, that code will simply cause errors, apart from it not being correct, the code is also trying to redirect after browser output has been sent.
This is how it is done with ASP (seeing as you are hosted on IIS 6) http://www.highranki...mp;#entry117701
Doesn't handle querystrings from standard but how to add that functionality is covered a few posts further down.
Because all your pages are .html extensions you WILL need to get your hosting co to set the application mappings to parse .html as asp, it is NOT a security risk as they will try to tell you and it will NOT put a huge additional load on the server (that went out with IIS 4).
If they do not know how to change the mappings, I have a walk through at http://www.candsdesi...ings/site-only/
IF they cannot manage to make it all work, or refuse, ( in either case getting a more enlightened host would be advisable ). The other option is to have two hosting configuration, one with a hostheader for the www version, the second for the non-www hostheader set with a permanent redirect ( walkthrough at http://www.candsdesi.../site-redirect/ )
I haven't written up the walkthrough on hostheaders as yet
#35
Posted 31 July 2007 - 08:46 AM
http://www.highranki...h...ost&p=60621
The example on this site is also the same as above except ASP instead of PHP.
http://www.highranki...h...st&p=213002
So why won't the code work?
#36
Posted 31 July 2007 - 09:45 AM
It has to be the very very very very first thing in the code on the page. Even before the DTD statement and the <head> tag. Up where line breaks and paragraph tags fear to tread.
--Torka
#37
Posted 31 July 2007 - 09:46 AM
BUT it will simply redirect every page to the home page. That code as it stands is fine for a new site/hostname that has NOT been indexed.
#38
Posted 31 July 2007 - 12:20 PM
header("Location: http://www.newdomain.com/newdir/newpage.htm");
exit();
I am forwarding Ian's article, http://www.mcanerin....edirect-IIS.asp, on IIS redirects to my hosting service and see what they can do.
According to the above article, it sounds like my best option is to have a separate non www account with either the php or asp redirect code in it.
Do you agree or am I still completly missing it?
I don't know if they will do this,but I'll see.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









