Solved

301 htaccess redirect not working!

Posted on 2011-02-22
4
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

636 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