Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache, website - forwarding/redirect/rewrite
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Tue Jan 25, 2011 5:46 pm    Post subject: Apache, website - forwarding/redirect/rewrite Reply with quote

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
View user's profile Send private message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Tue Jan 25, 2011 7:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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