문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top