Hello People,
Im trying to learn the URL Rewriting Module on Apache
and have come accross a small problem,
I've placed this in to my httpd.conf file as suggested by the URL Rewriting
Guide,
and it looks a little like this:
-------------------------------------------------------------Snip Snip
<VirtualHost 192.168.30.152:80>
RewriteEngine on
SSLDisable
Port 80
ServerName www.somewhere.com
DocumentRoot /www/users/s/somewhere/www
<Directory /www/users/s/somewhere/www/beer>
RewriteMap deflector txt:/www/users/s/somewhere/deflector.map
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
RewriteRule ^.* %{HTTP_REFERER} [R,L]
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
</Directory>
</VirtualHost>
-------------------------------------------------------------Cut Cut
and Have this in my deflector.map
------------------------------------------------------------- Snip Snip
##
## deflector.map
##
http://www.somewhere.com/redirect.html -
http://shop.somewhere.com/redirect.html http://www.somewhere.com
------------------------------------------------------------- Cut Cut
but I still get the same error when I run configtest
------------------------------------------------------------- Snip Snip
[root@some bin]# ./httpsdctl configtest
Syntax error on line 1068 of /www/httpd/conf/httpd.conf:
RewriteMap not allowed here
------------------------------------------------------------- Cut Cut
Im Running RH Linux 7
Server version: Apache/1.3.20 (Unix)
Some kind or direction would be greatly appreciated
Do I need to install any modules or the like or do I need to place the
RewriteEngine
on somewhere else,
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Im trying to learn the URL Rewriting Module on Apache
and have come accross a small problem,
I've placed this in to my httpd.conf file as suggested by the URL Rewriting
Guide,
and it looks a little like this:
-------------------------------------------------------------Snip Snip
<VirtualHost 192.168.30.152:80>
RewriteEngine on
SSLDisable
Port 80
ServerName www.somewhere.com
DocumentRoot /www/users/s/somewhere/www
<Directory /www/users/s/somewhere/www/beer>
RewriteMap deflector txt:/www/users/s/somewhere/deflector.map
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
RewriteRule ^.* %{HTTP_REFERER} [R,L]
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
</Directory>
</VirtualHost>
-------------------------------------------------------------Cut Cut
and Have this in my deflector.map
------------------------------------------------------------- Snip Snip
##
## deflector.map
##
http://www.somewhere.com/redirect.html -
http://shop.somewhere.com/redirect.html http://www.somewhere.com
------------------------------------------------------------- Cut Cut
but I still get the same error when I run configtest
------------------------------------------------------------- Snip Snip
[root@some bin]# ./httpsdctl configtest
Syntax error on line 1068 of /www/httpd/conf/httpd.conf:
RewriteMap not allowed here
------------------------------------------------------------- Cut Cut
Im Running RH Linux 7
Server version: Apache/1.3.20 (Unix)
Some kind or direction would be greatly appreciated
Do I need to install any modules or the like or do I need to place the
RewriteEngine
on somewhere else,
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org