Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

301 htaccess redirect not working!

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

926 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