Topic: 301 code not working
|

|
| Author |
|
CaptCrash Newbie

Joined: 13 May 2011 Location: United States
Online Status: Offline Posts: 3
|
| Posted: 13 May 2011 at 10:41am | IP Logged
|
|
|
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 |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 16 May 2011 at 8:06am | IP Logged
|
|
|
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
Online Status: Offline Posts: 3
|
| Posted: 16 May 2011 at 5:44pm | IP Logged
|
|
|
Andrew,
I appreciate the code, but this still did not work. Any other suggestions?
|
| Back to Top |
|
| |
CaptCrash Newbie

Joined: 13 May 2011 Location: United States
Online Status: Offline Posts: 3
|
| Posted: 16 May 2011 at 7:44pm | IP Logged
|
|
|
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 |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
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
|