Forum Moderators: phranque

Message Too Old, No Replies

QUERY STRING in httpd.conf versus .htaccess

         

BlueBlizz

11:00 am on Sep 1, 2009 (gmt 0)

10+ Year Member



the following code works in httpd.conf, but not in htaccess.
Since I want to write most of the code in 1 htaccess and not in 2 httpd.conf's (distributed servers with a shared directory where htacces is located) I prefer htaccess.
Why is it not working in htaccess?

<IfModule mod_rewrite.c>

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^/nl_NL/$ [NC]
RewriteCond %{QUERY_STRING} ^ObjectPath=/Categories/([a-zA-Z0-9-_]+)/([a-zA-Z0-9_-]+)[a-zA-Z0-9=&?_-]*$
RewriteRule ^(.*)$ [domain.nl...] [R=301,L]
</IfModule>

it should redirect a url like:
[domain.nl...]
to
[domain.nl...]

can anyone help me to do this in htaccess?

jdMorgan

2:26 pm on Sep 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is "AllowOverride Options" set in your httpd.conf file? If not, your code won't be enabled unless httpd.conf sets "Options +FollowSymLinks" or "Options +SymLinksIfOwnerMatch" for the directory tree in which your .htaccess code resides.

Jim