Solved

301 htaccess redirect not working!

Posted on 2011-02-22
4
306 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multiflying 2 Input Text On a Table 7 31
message Alert on an empty search 10 23
WordPress 8 36
Bootstrap 3 - Style a dropdown 1 15
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

821 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