View previous topic :: View next topic |
Author |
Message |
upengan78 l33t
Joined: 27 Jun 2007 Posts: 711 Location: IL
|
Posted: Tue Jan 25, 2011 5:46 pm Post subject: Apache, website - forwarding/redirect/rewrite |
|
|
Hi,
I don't know what to call it forwarding. redirect or rewrite..I want to achieve something like below with simple configuration and if possible only in apache2 , http.conf
Any request to "www.domain.com/abc" should go to "www.domain.com/~blah"
www.domain.com/~blah works.
I know I can create "/var/www/apache/localhost/abc" folder and then either an index.html with some code or a .htaccess inside folder "abc" to achieve the result.
Is there anyway I can achieve same w/o even creating abc directory?
Thanks, |
|
Back to top |
|
|
upengan78 l33t
Joined: 27 Jun 2007 Posts: 711 Location: IL
|
Posted: Tue Jan 25, 2011 7:31 pm Post subject: |
|
|
I think I can do this like below,
vi /etc/apache2/vhosts.d/default_vhost.include
Code: |
<IfModule alias_module>
Alias /abc /home/blah/public_html
###OR####
Redirect permanent /abc http://localhost/~blah
</IfModule> |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|