Redirecting all .html to homepage.com

Status
Not open for further replies.

jerxs

New member
Jun 24, 2006
1,806
24
0
North East PA
I am rebuilding a site that I built almost a year ago, most of its pages are indexed and all are static .html pages, I am going to be running a CMS on the rebuilt version and all pages will have a .php extension. what I want to do is just write some sort of redirect the will redirect any would be visitors that may land on the old html pages to hompage.com is there an easier way of doing this other than going through each page of the site and writing rule something like this for each..

Code:
 Redirect 301 /oldpage.html http://HomePage dot com
The pages that exist now the HTML pages will no longer exist on my server once I get the CMS up and running.

Thanks Jer
 


I am rebuilding a site that I built almost a year ago, most of its pages are indexed and all are static .html pages, I am going to be running a CMS on the rebuilt version and all pages will have a .php extension. what I want to do is just write some sort of redirect the will redirect any would be visitors that may land on the old html pages to hompage.com is there an easier way of doing this other than going through each page of the site and writing rule something like this for each..

Code:
 Redirect 301 /oldpage.html http://HomePage dot com
The pages that exist now the HTML pages will no longer exist on my server once I get the CMS up and running.

Thanks Jer

Don't quote me 100% on this even though I should know better but the answer is no, the whole problem with old school HTML pages is that if you wanted to edit one aspect across all pages you would have to go in and manually edit each aspect on each page and then CSS came out to help you out with the repetitive tasks, so you could now edit one page and see changes across all your pages, then things like PHP, and ASP.NET came out to make it extremely easy to edit one page and see changes across all of them.

The moral of the story is I think you might be fucked with the old HTML pages and you might have to take the time to do the redirect in each page.....unless you call a script on the server that does the re-direct, and then copy and past the script onto each page but one way or the other you'll have to edit all HTML pages.
 
God I hope not, he he he, that will be one hell of an undertaking, I mean the sites not huge, but even having manually set a redirect for a few hundred pages is going to be a major pain in the ass!

Jer
 
yes, that is what I was going to do, via .htaccess, but I have no clue as to how I would write a rule to call out all .html pages and then redirtect them to mydomainname.com.

But yes I have access
 
Nice little trick, I still don't know much about .htaccess, I really should read up on it.

Aequitas, you were saying that he would have to do all that manual work....as a rule of thumb, if you ever have to repeat something many times, chances are you're doing something wrong. :)
 
Aequitas, you were saying that he would have to do all that manual work....as a rule of thumb, if you ever have to repeat something many times, chances are you're doing something wrong. :)

I must be doing something really wrong then, I keep having to build these damn websites to make more money.

Gotcha though, I new there had to be an easier way of doing what I was aiming to do other than writing a rule for each and every page, I just know shit about doing stuff like that, other than writting a good old fashioned 301 redirect:anon.sml:
 
Aequitas, you were saying that he would have to do all that manual work....as a rule of thumb, if you ever have to repeat something many times, chances are you're doing something wrong. :)

This advice is very true for todays webpages, however I'm an older web developer and still used to the old manual ways of doing things, I've just recently began to bridge the gap (Only 1.5 years now) that I've moved up and started using asp.net 2.0, which is a dream and even though I've been developing webpages for a long time, I still don't know everything, little things have slipped my grasp over the years (I.E. htaccess), oh and I never got around to learning PHP.

Might sound like I'm a shitty web developer but maybe I just focused too much of my time on learning asp.net 2.0 and vbscript. I'll have to provide the site in my signature for proof I'm not all that bad hahaha.
 
Status
Not open for further replies.