This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: 301 code not working Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
CaptCrash
Newbie
Newbie


Joined: 13 May 2011
Location: United States
Online Status: Offline
Posts: 3
Posted: 13 May 2011 at 10:41am | IP Logged Quote CaptCrash

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 View CaptCrash's Profile Search for other posts by CaptCrash Visit CaptCrash's Homepage
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 16 May 2011 at 8:06am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
CaptCrash
Newbie
Newbie


Joined: 13 May 2011
Location: United States
Online Status: Offline
Posts: 3
Posted: 16 May 2011 at 5:44pm | IP Logged Quote CaptCrash

Andrew,

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


Joined: 13 May 2011
Location: United States
Online Status: Offline
Posts: 3
Posted: 16 May 2011 at 7:44pm | IP Logged Quote CaptCrash

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 View CaptCrash's Profile Search for other posts by CaptCrash Visit CaptCrash's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum