Forum Moderators: phranque
We have a site where we need to keep track of where the user is coming from (i.e. www.site.com/entry1, www.site.com/entry2, www.site.com/entry3 which would redirect to www.site.com/home?cog=entry1¦entry2¦entry3).
We already have some mod_alias rules set up to point to the local directory. Is it possible to use mod_rewrite along with mod_alias?
Here are the two config files:
<IfModule mod_alias.c>
Alias /home "/home/foo/smart/static/"
</IfModule> and here is where I am trying to redirect using mod_rewrite
RewriteEngine On
RewriteCond %{REQUEST_METHOD} TRACE
RewriteRule .* - [F]
RewriteRule ^/(entry1¦entry2¦entry3\.) /home [E=COG:$1]
This should in theory redirect to /home/foo/smart/static with an environment variable COG set to entry1, entry2, or entry3 right?
We are using Oracle Application Server, which is running apache on the back end. We have some dads set up on the back end that get redirected when the user hits the index.
What I am trying to do is keep track of where a user is coming from via the url and redirect everything to the same website. we have mod plsql running in the background serving out the web pages. so if the user comes to www.site.com/x or www.site.com/y or www.site.com/z they will get redirected to www.site.com/home?cog=x (or cog=y, cog=z).
If this something that is better suited to another tool than mod_rewrite?
Thanks in advance for any help!