| Welcome to Webforumz.com. |
|
Apr 16th, 2008, 17:53
|
#1 (permalink)
|
Join Date: Dec 2007
Location: London
Age: 35
Posts: 266
|
Redirect broken links
I changed the names of some of my web pages. Can someone provide code for redirect the old links?
Thanks
|
|
|
Apr 17th, 2008, 01:14
|
#2 (permalink)
|
|
Head Admin & CEO
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,311
|
Re: Redirect broken links
what technology do the old liks use oak? html, asp, php?
__________________
Rob Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com
My Mrs's site:- Student Midwife Forums
I am currently unavailable for private work
-------------------------------------------------
|
|
|
Apr 17th, 2008, 18:15
|
#3 (permalink)
|
Join Date: Dec 2007
Location: London
Age: 35
Posts: 266
|
Re: Redirect broken links
Well, all the files end in .php, but they don't all use php code.
|
|
|
Apr 17th, 2008, 18:23
|
#4 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
Re: Redirect broken links
Do you know if you're running the Apache web server?
You can use a .htaccess in the root of your web server to redirect certain pages to new ones.
For example, to redirect old.php to new.php, use; - Code: Select all
Redirect /old.php http://yoursite.com/new.php
__________________
|
|
|
Apr 17th, 2008, 19:16
|
#5 (permalink)
|
Join Date: Dec 2007
Location: London
Age: 35
Posts: 266
|
Re: Redirect broken links
Yes, Apache.
The code seems very straight forward. If there were many pages would I insert the following into my .htaccess file?
- HTML: Select all
Redirect /old.php http://yoursite.com/new.php
Redirect /old2.php http://yoursite.com/new.php
Redirect /old3.php http://yoursite.com/new.php
- saltedm8
I like that, def useful, so I would use your code for files that don't exsist as well as the code given by aso186 for old links. Resulting in everything being redirected!?
|
|
|
Apr 17th, 2008, 19:18
|
#6 (permalink)
|
Join Date: Dec 2007
Location: London
Age: 35
Posts: 266
|
Re: Redirect broken links
Hang on, where did saltedm8's reply go??
|
|
|
Apr 18th, 2008, 07:47
|
#7 (permalink)
|
|
Junior Member
Join Date: Feb 2007
Location: USA
Age: 25
Posts: 35
|
Re: Redirect broken links
Yes make changes in the htaccess file. Also it worth to make 301 redirect on server side to keep good SEO results.
|
|
|
Apr 18th, 2008, 09:36
|
#8 (permalink)
|
|
Lead Administrator
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
|
Re: Redirect broken links
Quote:
|
Hang on, where did saltedm8's reply go??
|
sorry, i accidentally deleted it and did not have time to re-write it
|
|
|
Apr 18th, 2008, 21:09
|
#9 (permalink)
|
Join Date: Dec 2007
Location: London
Age: 35
Posts: 266
|
Re: Redirect broken links
Quote:
|
Yes make changes in the htaccess file. Also it worth to make 301 redirect on server side to keep good SEO results.
|
Sorry can you explain in more detail, thanks.
Quote:
|
sorry, i accidentally deleted it and did not have time to re-write it
|
Any chance of re-posting?
|
|
|
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|