Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache internal redirect/rewrite configuration question
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
mshmsh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2004
Posts: 107
Location: Foster City, CA

PostPosted: Sat Feb 03, 2007 5:39 am    Post subject: apache internal redirect/rewrite configuration question Reply with quote

Hi,
Clients may enter my apache server thro' /entrypoint/A or /entrypoint/B
I like to set the environment variable requestor to A or B accordingly
and then redirect (internally) to /entrypoint/file.php without sending a redirect to the client
How do I do this.
What can I fill in the CALL /entrypoint/file.php line to accomplish this?

<LocationMatch "/entrypoint/A">
SetEnv requestor A
===========CALL /entrypoint/file.php==============
</LocationMatch>

<LocationMatch "/entrypoint/B">
SetEnv requestor B
===========CALL /entrypoint/file.php==============
</LocationMatch>

Thanks,
Shyam
Back to top
View user's profile Send private message
justindossey
n00b
n00b


Joined: 07 Feb 2007
Posts: 1

PostPosted: Wed Feb 07, 2007 11:58 pm    Post subject: Reply with quote

If you haven't worked it out already:

There are several ways to do this. The one I find the easiest is to use mod_rewrite:

RewriteEngine On
RewriteRule .* /entrypoint/file.php [L]

The REQUEST_URI in the request env will contain /entrypoint/A or /entrypoint/B.
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