This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: Rewrite - 404 error on commonly used rule
Author
Message |
dtnsemprog
Newbie


Joined: 10 March 2010
Location: United States
Posts: 19
Posted: 10 March 2010 at 5:35pm

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
Posts: 10519
Posted: 11 March 2010 at 1:46am

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
Posts: 19
Posted: 11 March 2010 at 10:42am

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
Posts: 10519
Posted: 12 March 2010 at 1:45am

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
Posts: 19
Posted: 12 March 2010 at 2:41pm

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
Posts: 10519
Posted: 15 March 2010 at 4:01am

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
Posts: 19
Posted: 15 March 2010 at 3:33pm

That did it.

I really appreciate the help.

Thank You!
Back to Top
 

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

Printable version Printable version
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