Web Design Forum: 301 Page Redirect Help! - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

301 Page Redirect Help!

#1 User is offline   CQ Website Design 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 47
  • Joined: 02-January 09
  • Reputation: 0
  • Location:United Kingdom
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 15 November 2011 - 12:11 PM

Hello I have renamed a bunch of files on a webiste and need to create some 301 redirects to fix the old URLs.

This is what I have done in the .htaccess which is in the ROOT of the websites folder:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.co.uk
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]

redirect 301 /oldfolder/oldfolder/oldfile.html http://www.domain.co.uk/newfolder/newfolder/newfile.html


But it wont redirect the old URL to the new one what am I doing wrong?

Thanks

This post has been edited by CQ Website Design: 15 November 2011 - 12:14 PM

0

#2 User is online   Spitfire 

  • Mighty Pirate™
  • PipPipPipPip
  • Group: Members
  • Posts: 891
  • Joined: 05-February 11
  • Reputation: 189
  • Gender:Male
  • Location:Berkshire
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 15 November 2011 - 01:05 PM

Try:

redirect 301 "/oldfolder/oldfolder/oldfile.html" http://www.domain.co.uk/newfolder/newfolder/newfile.html

0

#3 User is offline   CQ Website Design 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 47
  • Joined: 02-January 09
  • Reputation: 0
  • Location:United Kingdom
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 15 November 2011 - 01:45 PM

Nope that didnt work either, the redirect to www from non-www works perfect but I am having problems with redirect old page URLs ot new ones :(

The re-direct are for PDF files, could this be why it is not working? It just shows 404 when I setup the redirect.

This post has been edited by CQ Website Design: 15 November 2011 - 01:49 PM

0

#4 User is offline   mOxby Design 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 84
  • Joined: 02-October 10
  • Reputation: 9
  • Gender:Male
  • Location:Inverness, Scotland
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 24 November 2011 - 09:30 AM

For PDFs what I would be tempted to do would be to ensure that you have a custom 404 page on which you say you've moved some files around and provide links to the new PDFs.

The other thing is to make sure you've cleared your cache after you've uploaded your new htaccess file but before you re-try it in a browser. Sometimes I've found browsers work off the downloaded version rather than the new one.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users