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.
accessing scripts
Moderator: General Moderators
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
.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You can also set up "virtual directories".
In apache you simly add
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 
In apache you simly add
Code: Select all
Alias /scripts "e;/path/to/files/"e;