I'm using Apache 2.2 with mod_rewrite.
Is there a way to force mod_rewrite to rewrite the entire URL, including protocol? I know it will automatically rewrite the whole URL if the redirect contains http://
at the beginning but I'm trying to redirect to a URL that uses a proprietary protocol: fcp://
When I add it in as the redirect it just redirects to the URL of my server with the rewrite appended like so:
http://www.example.com/fcp://@mailstaff....
Can I configure the module to treat fcp://
as a full URL so I don't run in to this?
UPDATE: Here is the code I am using:
RewriteCond ${externals:$2|Unknown} !Unknown
RewriteRule ^(internal|external)/(.*)/? ${externals:$2} [R=301,NE,L,NS]
Inside the externals
RewriteMap, I have a line like this:
firstclass-email fcp://@mailstaff.example.com/
When I go to trigger the RewriteRule by going to:
http://example.com/internal/firstclass-email
It will incorrectly redirect me to here:
http://example.com/fcp://@mailstaff.example.com/
If I change the protocol part from fcp://
to http://
, Apache will realize it's an absolute URL and work correctly. I want Apache to recognize fcp://
should also be absolute.