View previous topic :: View next topic |
Author |
Message |
mshmsh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/owner.gif)
Joined: 29 Jan 2004 Posts: 107 Location: Foster City, CA
|
Posted: Sat Feb 03, 2007 5:39 am Post subject: apache internal redirect/rewrite configuration question |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
justindossey n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 07 Feb 2007 Posts: 1
|
Posted: Wed Feb 07, 2007 11:58 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|