Forum Moderators: phranque

Message Too Old, No Replies

when mod_rewrite gets activated..

when mod_rewrite gets activated..

         

akbsol

7:56 am on Feb 15, 2005 (gmt 0)

10+ Year Member



Well I have a site which gets atleast 20-30 thousand hits a day. A part of it requires mod_rewrite and other part doesn't. Now to avoid additional server load, I want that the part which doesn't require the module shouldn't turn the rewrite engine on. The site structure is like this:

public_html
public_html/site

There is a .htaccess file in public_html which just contains one line to disable indexing. The main problem is with the folder "site". The website is accessed in this way:

[site.mydomain.com...]

and this folder "site" is actually a sub-domain folder. It contains 9 scripts out of which 8 are accessed directly by users (like this [site.mydomain.com...] [site.mydomain.com...] etc). but when a user enters a url like this:

[site.mydomain.com...] five digit number}

it gets rewrited to that 9th script which is not available directly. As the .htaccess lies in the folder "site", it will turn the re-write engine on whenever anything in this folder gets accessed. But I don't want it with script1.cgi, script2.cgi etc.

I hope you understood my problem. Please help.

coopster

1:32 pm on Feb 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, akbsol.

Are you familiar with Apache Configuration Section Containers [httpd.apache.org]? Perhaps the <Files> [httpd.apache.org] directive is just the container for you?

Also, if you can at all avoid using per-directory override files (.htaccess), you should. You'll see a performance improvement if you edit the httpd.conf file itself.

akbsol

2:41 pm on Feb 15, 2005 (gmt 0)

10+ Year Member



I don't have access to httpd.conf. I am on a shared server.