Topic: Getting rewrite working on child .htacces
|

|
| Author |
|
zimbabwe007 Newbie

Joined: 08 August 2008
Online Status: Offline Posts: 3
|
| Posted: 08 August 2008 at 4:40pm | IP Logged
|
|
|
Hi there,
I have installed the full version of ISAPI Rewrite 3.0 - but haven't paid for it yet.
I can get the following directive to work only if I put it in the root http.conf file:
RewriteEngine on RewriteRule ^/my-super-product\.html$ /2-3_product-detail.cfm?pid=84 [RP]
I have about 100 sites on the server and am trying to install this directive into one of the specific site directories.... but it is completely unresponsive unless that directive is in the root.
Could this be happening because I haven't licensed the product yet? Do I have to somehow enable rewrite on sub-sites... or is it something else?
Any ideas?
Thanks! Tim
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Online Posts: 4842
|
| Posted: 11 August 2008 at 3:40am | IP Logged
|
|
|
Please put the following into the .htaccess in the root of your site:
RewriteEngine on RewriteBase / RewriteRule ^my-super-product\.html$ 2-3_product-detail.cfm?pid=84 [NC,R=301,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
zimbabwe007 Newbie

Joined: 08 August 2008
Online Status: Offline Posts: 3
|
| Posted: 11 August 2008 at 11:49am | IP Logged
|
|
|
Hey thanks!
That is working, however, it is actually changing the URL.
I enter /my-super-product.html and after the page loads, the URL is actually changed to /2-3_product-detail.cfm?pid=84
I'm hoping to maintain the original value of the URL (my-super-product.html) so that it is not obvious to the user that they have been redirected.
Thanks! Tim
|
| Back to Top |
|
| |
zimbabwe007 Newbie

Joined: 08 August 2008
Online Status: Offline Posts: 3
|
| Posted: 11 August 2008 at 12:01pm | IP Logged
|
|
|
OK, I actually figured that out by changing my directive in the individual site's root folder to this:
RewriteEngine on RewriteBase / RewriteRule ^my-crazy-product\.html$ 2-3_product-detail.cfm?pid=84 [RP]
This made it work perfectly...
But the weird thing is, if I try a very similar directive in another site's root folder, it doesn't work - I just get a Page Not Found error. I'm not sure why it would work in one site and not another.
Here is the directive:
RewriteEngine on RewriteBase / RewriteRule ^resources\.html$ 9-0_resources.cfm [RP]
Any ideas?
Thanks, Tim
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Online Posts: 4842
|
| Posted: 12 August 2008 at 3:30am | IP Logged
|
|
|
Please check the permissions as per http://www.helicontech.com/isapi_rewrite/doc/security.htm And please use R=301 instead of RP as you are using ISAPI_Rewrite3.
__________________ Regards,
Anton
|
| 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
|