Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: Rewrite - 404 error on commonly used rule Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dtnsemprog
Newbie
Newbie


Joined: 10 March 2010
Location: United States
Online Status: Offline
Posts: 19
Posted: 10 March 2010 at 5:35pm | IP Logged Quote dtnsemprog

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 View dtnsemprog's Profile Search for other posts by dtnsemprog
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10487
Posted: 11 March 2010 at 1:46am | IP Logged Quote Anton

The config should be:

RewriteBase /
RewriteRule ^plan-your-visit/what-to-eat/?$ restaurants [NC,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
dtnsemprog
Newbie
Newbie


Joined: 10 March 2010
Location: United States
Online Status: Offline
Posts: 19
Posted: 11 March 2010 at 10:42am | IP Logged Quote dtnsemprog

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 View dtnsemprog's Profile Search for other posts by dtnsemprog
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10487
Posted: 12 March 2010 at 1:45am | IP Logged Quote Anton

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


Joined: 10 March 2010
Location: United States
Online Status: Offline
Posts: 19
Posted: 12 March 2010 at 2:41pm | IP Logged Quote dtnsemprog

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 View dtnsemprog's Profile Search for other posts by dtnsemprog
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10487
Posted: 15 March 2010 at 4:01am | IP Logged Quote Anton

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


Joined: 10 March 2010
Location: United States
Online Status: Offline
Posts: 19
Posted: 15 March 2010 at 3:33pm | IP Logged Quote dtnsemprog

That did it.

I really appreciate the help.

Thank You!
Back to Top View dtnsemprog's Profile Search for other posts by dtnsemprog
 

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 cannot vote in polls in this forum