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 is the relevant info from my config file:
- Code: Select all
<IfModule mod_alias.c>
Alias /home "/home/foo/smart/static/"
</IfModule>
and here is where I am trying to redirect using mod_rewrite
- Code: Select all
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?