Forum Moderators: phranque
My main concern here is finding the best method to accomplish the task by using the least system resources (like cpu processes, or site requests, or whatever).
First I need to make the decision on whether to have these options put into the site configuration (conf file), or if I should have them in an .htaccess file.
If I were to place them in the site configuration setup, I need to know if I should use an <IfModule> or <Directory> method.
then I need to decide which extension to use. My options are using "Rewrite" or "ProxyPass."
Does anyone have suggestions on the most efficient method?
Thank you,
Leo
Other than that, using httpd.conf will be much more efficient than using .htaccess. The "Internal Processing - API Phases" part of the mod_rewrite documentation will explain why.
Jim
As far as ways to implement, does it matter if I use the <IfModule> or <Directory> methods for the conf?
I think the rewrite method uses the ProxyPass, so I guess it wouldn't matter which one I used?
Rewrite method:
<Directory /home/httpd/htdocs/>
RewriteEngine on
RewriteRule ^(.*)$ http://www.domain.com/subdir/$1 [P]
</Directory>
Proxy method:
<IfModule mod_proxy.c>
ProxyPass / http://www.domain.com/subdir/
ProxyPassReverse / http://www.domain.com/subdir/
</IfModule>
Jim