RewriteMap not allowed here (please help)

RewriteMap not allowed here (please help)

Post by Ralf S. Engelscha » Mon, 31 Aug 1998 04:00:00




> I am trying to use a referring url redirection with the rewrite module.  It
> works fine in httpd.conf, but when I use it in .htaccess, I get the following
> error message in the error_log:
> access to /path/.htaccess failed for [ip], reason: RewriteMap not allowed here
> This is the contents of the .htaccess file:
>  Rewri*gine   on
>  RewriteMap      deflector txt:/home/skiesare/deflector.map
>  RewriteRule     ^/(.*) ${deflector:%{HTTP_REFERER}|/$1}
>  RewriteRule     .* - [PT]
> I'm running Redhat 5.0.  The httpd has mod_rewrite compiled in.
> Can someone give me some help?

Would help do you expect? The error message is correct and clear: "RewriteMap
not allowed here", i.e. you cannot use RewriteMap in .htaccess files. It's
intended this way and documented this way. The reason is security (only the
webmaster can define RewriteMaps, although they can be _used_ by normal users
in their .htaccess files, too).

Greetings,
                                       Ralf S. Engelschall

                                       www.engelschall.com

 
 
 

RewriteMap not allowed here (please help)

Post by Brian Tieman » Tue, 01 Sep 1998 04:00:00



> Most of the help pages just listed some code to do whatever... but didn't
> really say where to put the code.  Maybe I'm just stupid, but I would really
> appreciate some help.

        Directives that can't be used in .htaccess files are meant to be used
in the general server configuration files, i.e. srm.conf, httpd.conf, or
access.conf.

        To apply the configuration to certain directories from within the
server config (say, access.conf), do this:

<Directory /path/to/wherever>
Rewri*gine   on
RewriteMap      deflector txt:/home/skiesare/deflector.map
RewriteRule     ^/(.*) ${deflector:%{HTTP_REFERER}|/$1}
RewriteRule     .* - [PT]
</Directory>

        <Directory> applies to a filesystem path, i.e.
/home/skiesare/public_html/whatever. You can also use <Location>,
<Files>, and so on. Those are all documented at http://www.veryComputer.com/.

Brian

 
 
 

1. access not allowed - help please

Hi,
I'm trying to limit acces to certain CGI's in apache 1.3 using user
athentication
her's the fragment from my access.conf and .htaccess in the cgi-bin

<Directory /usr/local/WWW/cgi-bin>
AllowOverride AuthConfig Limit Options
Options ExecCGI Indexes Includes SymLinksIfOwnerMatch
</Directory>

.htaccess

<Files ejj1.pl>
order deny,allow
deny from all
allow from .csc.smith.edu
AuthName "SiteManager"
AuthType Basic
AuthUserFile /usr/local/apache/etc/users
require valid_user
Satisfy all
</Files>

I get the following error when I execute ejj1.pl after I enter the user
and password:

[Thu Oct  1 15:26:21 1998] [error] access to /cgi-bin/ejj1.pl failed for
localhost, reason: user ejensen not allowed access

Any help would be great. The password stuff is fine. Also if I remove
the .htaccess, I can run the CGI. I've looked a bit but came up blank on
this.

Eric

2. 2.6 /sbin/ksh vs /bin/ksh

3. XFree86 4.1.0 only allows 640x480 (with CT65550) (please...please help...)

4. Talking directly to the video

5. help help help Post not allowed

6. Wanted: XF86Config for a Tecra 780 DVD

7. LAN Telnet logins allowed, Internet not allowed

8. trouble with mouse...

9. tcpwrappers / hosts.allow not allowing in domains

10. Help with mod_rewrite and rewritemap

11. rewriteMap in apache dies when mysql used..? help!

12. Help with RewriteMap, and Conditions

13. host.allow and host.deny config help Please