This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: 301 code not working
Author
Message |
CaptCrash
Newbie


Joined: 13 May 2011
Location: United States
Posts: 3
Posted: 13 May 2011 at 10:41am

I am running a site on a Windows server (dedicated through GoDaddy). I installed ISAPI and using my htaccess, the "www" "non-www" redirect is working.  However, I cannot get the internal pages to redirect. Here is what my files looks like:

Options +FollowSymLinks 
RewriteEngine On

#non www to www
RewriteCond %{HTTP_HOST} ^abc123\.com
RewriteRule (.*) http://www.abc123.com/$1 [R=301,nc]

#direct index files to parent directory
#RewriteCond %{the_request} ^[A-Z]{3,9}\ /([^/]+/)*index\.(php|htm|html|shtml|asp|aspx|cfm|pl)[^\ ]*\ HTTP/
#RewriteRule ^([^/]+/)*index\.(php|htm|html|shtml|asp|aspx|cfm|pl)$ http://www.abc123.com/$1? [R=301,nc]


#Redirect 301 /Machines/Auto_Machines_1.html http://www.abc123.com/machines/cpap-machines.html
#RedirectRule  ^/CPAP_Masks/Nasal_Masks_1.html http://www.abc123.com/masks/nasal.html [NC,R=301]
#RewriteRule /CPAP_Masks/Nasal_Masks_1.html http://www.abc123.com/masks/nasal.html [I,O,RP,L]

(these are the variations that I have tested, but have not worked)

Any ideas of what I am doing wrong?
Back to Top Visit CaptCrash's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 16 May 2011 at 8:06am

Please, try using the following variant:

Code:
RewriteRule ^CPAP_Masks/Nasal_Masks_1\.html$ http://www.abc123.com/masks/nasal.html [NC,R=301,L]


Regards
Andrew

Edited by AndrushkaUS - 17 May 2011 at 3:10am
Back to Top
 
CaptCrash
Newbie


Joined: 13 May 2011
Location: United States
Posts: 3
Posted: 16 May 2011 at 5:44pm

Andrew,

I appreciate the code, but this still did not work.  Any other suggestions?
Back to Top Visit CaptCrash's Homepage
 
CaptCrash
Newbie


Joined: 13 May 2011
Location: United States
Posts: 3
Posted: 16 May 2011 at 7:44pm

Andrew,I went back and started messing with the code that you sent. it worked!!Thanks!!!


Edited by AndrushkaUS - 17 May 2011 at 3:43am
Back to Top Visit CaptCrash's Homepage
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version