Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1438
  • Last Modified:

.htaccess 301 redirect problem

hi, I've had help with this before so I based my new redirect off the scripts from that session. This is a different site but similar setup. Here's the script I'm having a problem with-  

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^Sulzerproducts\.html$ http://www.sulzerconsulting.com/Vorne.html [R=301]

I'm deleting-

http://www.sulzerconsulting.com/Sulzerproducts.html

new page will be-

http://www.sulzerconsulting.com/Vorne.html

Thanks in advance.

Scott
0
ScottRAnderson1
Asked:
ScottRAnderson1
  • 4
  • 2
1 Solution
 
keithslaterCommented:
Have you tried just:

Redirect 301 /Sulzerproducts.html http://www.sulzerconsulting.com/Vorne.html
0
 
hankknightCommented:
You may do this with mod_rewrite like this:

RewriteEngine On
RewriteRule ^Sulzerproducts.html$ http://www.sulzerconsulting.com/Vorne.html [R=301,L]

Open in new window

0
 
ScottRAnderson1Author Commented:
Thanks. I put it into the .htaccess file and the button still went to the old page. Do I need to delete the old page to make this work? I didn't on the other site I did this with.
0
Independent Software Vendors: 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!

 
ScottRAnderson1Author Commented:
hankknight - This one had the same result.
0
 
hankknightCommented:
ScottRAnderson1, I tested the mod_rewrite code that I posted and it does indeed work.

The problem is that .htaccess are specifically for the Apache HTTPD Webserver and NOT for IIS.

The "sulzerconsulting.com" website is powered by IIS version 7, NOT by Apache!

There is an IIS module called "Helicon APE" that can be used to make IIS honor .htaccess directives:

http://www.helicontech.com/ape/

But Helicon APE is not installed on your website.

This may help you:
http://www.learnmsexchange.com/windows-servers/windows-server-2008/iis-windows-server-2008/293-iis-70-redirection-in-windows-server-2008-

Otherwise, consider adding this JavaScript inside the <head> area of the  "Sulzerproducts.html" page: (Not a true 301 redirect)
<script type="text/javascript">
document.location='http://www.sulzerconsulting.com/Vorne.html';
</script>

Open in new window

0
 
ScottRAnderson1Author Commented:
Thanks for the info. I will forward to my client and they can decide how to proceed on the Helicon Ape item. It may not be worth the hassle but I'll see. We had one page that was going to be deleted so I wanted to keep google from showing any dead links. I'll use the above script and go from there. Thanks. Scott
0
 
ScottRAnderson1Author Commented:
Thorough explanation and guidance to a solution.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now