Hey Guys
When developing locally im wanting to set the root for each site. Currently i have to refer to links as /sitefoldername/images, instead of /images as with my remote host. I need to use absolute links as im using mod_rewrite
I also require others to have access over the lan. I have used vhosts to do it, and it works on my machine (where apache runs) but others couldn't access over the lan, and i dont want to change the hosts file on each.
eg.. httpd.conf
<VirtualHost 127.0.0.1>
ServerName sitename.dev
DocumentRoot "c:/root/dev"
RewriteEngine on
RewriteRule ^/([a-z]+)$ /index.php?page=$1
</VirtualHost>
hosts file
127.0.0.1 sitename.dev
I also tried updating the root when in the site folder
eg - sitefolder/.htaccess...
DocumentRoot "c:/root/site folder"
But gives internal errors, is it possible to do it this way??
Ideally i just want to be able to access localhost(or my computer name)/sitename and have the root as the sitename folder.
There must be an easy way to do this
Any ideas??
Thanks
xp pro
apache 2.0.4.7
php 4.3.3
When developing locally im wanting to set the root for each site. Currently i have to refer to links as /sitefoldername/images, instead of /images as with my remote host. I need to use absolute links as im using mod_rewrite
I also require others to have access over the lan. I have used vhosts to do it, and it works on my machine (where apache runs) but others couldn't access over the lan, and i dont want to change the hosts file on each.
eg.. httpd.conf
<VirtualHost 127.0.0.1>
ServerName sitename.dev
DocumentRoot "c:/root/dev"
RewriteEngine on
RewriteRule ^/([a-z]+)$ /index.php?page=$1
</VirtualHost>
hosts file
127.0.0.1 sitename.dev
I also tried updating the root when in the site folder
eg - sitefolder/.htaccess...
DocumentRoot "c:/root/site folder"
But gives internal errors, is it possible to do it this way??
Ideally i just want to be able to access localhost(or my computer name)/sitename and have the root as the sitename folder.
There must be an easy way to do this
Any ideas??
Thanks
xp pro
apache 2.0.4.7
php 4.3.3