Question

I'm on a virtual server so I don't have access to Apache's htdocs; all I have is .htaccess. Is it still possible to do a rewrite map? What kind of workarounds are there?

Was it helpful?

Solution

If you read the documentation you will see that, in the doc field named 'Context', the RewriteMap directive may be used in the server config or in the virtual host config. It is not permitted in directory or .htaccess - to be clear, the answer is No, it is not still possible to do a rewrite map if all you have access to is .htaccess.

http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritemap

The only 'workaround' would be to define a RewriteCond and RewriteRule for every mapping that you need. These can be defined in .htaccess.

This question was already answered in

use RewriteMap in htaccess file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top