How to redirect (or Alias) jump page with Apache

aliasapache-2.2mod-aliasredirect

I'm not an Apache expert but need to make a small change to a web server. We are introducing a "jump page" URL that is different from a primary URL (for tracking reasons).

/productA/index.html
/productA/jump_index.html

Basically i want to log that jump_index.html was requested and then return index.html. I don't want the client to wait 8 seconds or so for a redirect.

How should we be handling this? Simply symlink (or alias) the file in the filesystem? Use mod_alias Alias Match (if so how exactly)? something better still?

Edit: mod_rewrite in httpd.conf:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^TRACE
    RewriteRule .* - [F]
</IfModule>

Best Answer

Just use an HTTP redirect, e. g. with RedirectPermanent or more dynamically with RedirectMatch:

RedirectPermanent /productA/jump_index.html http://example.com/productA/index.html
RedirectMatch permanent \/(product.*)\/jump_index\.html http://example.com/$1/index.html