Welcome to WebmasterWorld Guest from 54.145.176.120

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

RewriteMap not working? Why?

   
10:15 am on Feb 13, 2014 (gmt 0)

5+ Year Member



I am trying to figure out why my server doesnt work with RewriteMap directive (ie, "RewriteMap myunescape int:unescape).

More specifically i am trying to use the "unescape" feature. I've tried very simple examples (as found on Apache site) and the results are as if the use of ${myunescape:$1} is being ignored. It's like it doesnt understand the "${..}" part and just fails.

Any ideas?
2:08 pm on Feb 13, 2014 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



if you have access to the server config you could turn on rewrite logging.

i would also check the server error log.
3:17 pm on Feb 13, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Is it your own server, or do you mean simply the server that your site is hosted on? The difference is crucial when it comes to RewriteMaps.
5:14 am on Feb 14, 2014 (gmt 0)

5+ Year Member



thanks for the heads up as i discovered by asking the admin (im hosting on a shared server) and he made me aware that one needs access to the server .conf file since it is not available via httacess file :(

Not a big deal since i decided to just recreate the same thing within php.
5:38 am on Feb 14, 2014 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



oops!

i forgot about that part.

http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritemap
Syntax: RewriteMap MapName MapType:MapSource
Context: server config, virtual host
9:53 am on Feb 14, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



You can USE a RewriteMap in htaccess-- but only if it has been declared in config AND you know the name it has been given. This is not the kind of thing that a shared host would usually bother to do. (I once asked mine, and learned that they simply hadn't installed the RewriteMaps. You need at least a VPS.)
7:37 pm on Feb 15, 2014 (gmt 0)

5+ Year Member



Thanks phranque and lucy24 for both your excellent help!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month