Page 1 of 1

accessing scripts

Posted: Mon Jul 18, 2005 11:04 pm
by bhm8hwcm
I am looking to host a few sites and I would like to use many of the same scripts on each site. For example if I have a common login.php page. I want to use the exact same script for each site but I do not want to have to put this script in the root of each site.

My question is how do I reference this page. If I have a menu item going to http://www.something.com/login.php but login.php will not actually exist in the doc root. Is this possible?

I am also using Smarty.

Any help is appreciated.

Posted: Tue Jul 19, 2005 1:55 am
by delorian
Read about mod_rewrite. If you do not want to put login.php in the root dir you can create a login directory and put login scripts there :P :).

Posted: Tue Jul 19, 2005 9:32 am
by Chris Corbyn
You can also set up "virtual directories".

In apache you simly add

Code: Select all

Alias /scripts &quote;/path/to/files/&quote;
in httpd.conf and restart the server to allow http://www.site.com/scripts/ to point to a particular folder not in the web root ;)