I have a master directory whihc houses all our source code and unfortunately two applications were installed within this directory:
1. WordPress blog
2. Live help
These are stored in the docroot directory as:
/blog
/help
and sit alongside dozens of files and folders.
Everytime the developers upload the test site onto the live server -- I fear the WordPress or Live Help will stop working because something gets reset or overwritten with changes made to the original source -- this has happened a few times.
Can I remove these applications physically from the docroot but have apache still resolve the request:
http://www.domain.com/help
http://www.domain.com/blog
To somewhere like:
/var/webapps/
As opposed to having them sit in the docroot with other files which are part of our SVN setup, etc...
/var/www.domain.com/blog
/var/www.domain.com/help
/var/www.domain.com/index.php
/var/www.domain.com/about.php
/var/www.domain.com/classifieds.php
/var/www.domain.com/forums.php
Make sense? Is this possible? What would I add to the .htaccess file in the docroot?
Internal redirect using Apache -- mod_rewrite?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Internal redirect using Apache -- mod_rewrite?
You can setup aliases in the httpd.conf virtual host like follows:
Joe Ceresini
Network Engineer
jceresini@hostmysite.com
HostMySite.com
Code: Select all
<VirtualHost [server_ip]:80>
[...]
Alias /blog/ "/var/webapps/blog"
Alias /help/ "/var/webapps/help"
DocumentRoot /var/www/html
[...]
</VirtualHost>
Joe Ceresini
Network Engineer
jceresini@hostmysite.com
HostMySite.com
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Internal redirect using Apache -- mod_rewrite?
Sweet thanks a million 