| Author |
|
dtnsemprog Newbie

Joined: 10 March 2010 Location: United States
Online Status: Offline Posts: 19
|
| Posted: 10 March 2010 at 5:35pm | IP Logged
|
|
|
I am trying to rewrite the folder:
http://www.mysite.com/plan-your-visit/what-to-eat/
to:
http://www.mysite.com/restaurants
I am using the following rule:
RewriteRule ^plan-your-visit/what-to-eat/?$ /restaurants [NC,NS,R=301]
When I go to http://www.mysite.com/plan-your-visit/what-to-eat/ it does rewrite the url but the content is gone and I get a 404 error. I am not trying to redirect, just to rewrite.
Thanks in advance.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10487
|
| Posted: 11 March 2010 at 1:46am | IP Logged
|
|
|
The config should be:
RewriteBase /
RewriteRule ^plan-your-visit/what-to-eat/?$ restaurants [NC,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
dtnsemprog Newbie

Joined: 10 March 2010 Location: United States
Online Status: Offline Posts: 19
|
| Posted: 11 March 2010 at 10:42am | IP Logged
|
|
|
I appreciate your response. I actually did try that format, however, that for some reason does not even rewrite the url. The url stays the same but I get a 404 error.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10487
|
| Posted: 12 March 2010 at 1:45am | IP Logged
|
|
|
Ok, then please specify the version and build of ISAPI_Rewrite you are using.
Then please enable logging in httpd.conf as per instructions in our FAQ.
And provide rewrite and error logs records that will be generated upon your request.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
dtnsemprog Newbie

Joined: 10 March 2010 Location: United States
Online Status: Offline Posts: 19
|
| Posted: 12 March 2010 at 2:41pm | IP Logged
|
|
|
I am using ISAPI_Rewrite 3.1.0.63 I do not have access to the logs.
I am running over 500 redirects from an isapi_mod_rewrite.ini file. They are all working properly except for this one.
Also, there are other rules redirects to "plan-your-visit/what-to-eat/" (ex: RewriteRule ^partners\.cfm$ /plan-your-visit/what-to-eat/\? [NC,NS,R=301])
Now I am trying to keep the content at "plan-your-visit/what-to-eat/" but redirect it to "/restaurants"
I tried a number of things meaning to make sure these other rewrites can
still exist.
I tried removing the other redirects to what-to-eat, but unless I missed one, it was still giving me the 404. That was when I got frustrated and posted this.
Hope this new info will make a difference.
Thanks again for the help.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10487
|
| Posted: 15 March 2010 at 4:01am | IP Logged
|
|
|
Thanks for explanation. Let's try to use the following set of rules:
RewriteRule ^plan-your-visit/what-to-eat/?$ restaurants [NC,R=301,L]
RewriteRule ^restaurants$ plan-your-visit/what-to-eat/ [NC,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
dtnsemprog Newbie

Joined: 10 March 2010 Location: United States
Online Status: Offline Posts: 19
|
| Posted: 15 March 2010 at 3:33pm | IP Logged
|
|
|
That did it. 
I really appreciate the help.
Thank You!
|
| Back to Top |
|
| |