Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

301 htaccess redirect not working!

Posted on 2011-02-22
4
Medium Priority
?
310 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

715 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