Solved

301 htaccess redirect not working!

Posted on 2011-02-22
4
302 Views
Last Modified: 2012-08-13
I need redirect old html page to the new ones.

I have decided to use htaccess however I cannot get this to work.

The attached code is the complete code I am using.

When this code is uploaded to the root it just displays the error shown on the attached screenshot   Image1 Image2
Redirect 301 /approved_dealers/dealers.htm /index.html
Redirect 301  /faq/faq.htm /faq.html
Redirect 301  /products/products.htm /benefits.html
Redirect 301  /employment/employment.htm /index.html
Redirect 301  /news/news.htm /index.html
Redirect 301  /price_information/price_list.htm /buy.html
Redirect 301  /swift_owners/swift_owners.htm /index.html

Open in new window

0
Comment
Question by:BrighteyesDesign
  • 2
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
Scott Madeira earned 500 total points
ID: 34951068
The third parameter of your redirect must be a URL, I believe, for example:  

Redirect 301  /news/news.htm http://www.example.com/index.html
0
 
LVL 14

Expert Comment

by:Scott Madeira
ID: 34951075
Also, the Internal Server Error means Apache had a problem parsing the configuration file.  It found an invalid command which would be your redirect statements.
0
 

Author Comment

by:BrighteyesDesign
ID: 34951236
Thanks for that.

I have added the full URL's but that error still shows.

Redirect 301 /approved_dealers/dealers.htm http://www.website.co.uk/index.html
Redirect 301  /faq/faq.htm http://www.website.co.uk/faq.html
Redirect 301  /products/products.htm http://www.website.co.uk/benefits.html
Redirect 301  /employment/employment.htm http://www.hal-locate.eu/index.html
Redirect 301  /news/news.htm http://www.website.co.uk/index.html
Redirect 301  /price_information/price_list.htm http://www.hal-locate.eu/buy.html
Redirect 301  /swift_owners/swift_owners.htm http://www.hal-locate.eu/index.html
0
 

Author Comment

by:BrighteyesDesign
ID: 34951305
Sussed it.

The file was being uploaded as binary rather than ASCII

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now