views:

20

answers:

1

I have the following rewrite rules:

RewriteRule ^products/([a-zA-Z]+)$ /proyect/clients/index.php?database=$1&module=products [L,QSA]

The directory structure is as follows:

/var/www/proyect/clients/index.php

When writing the address "http://host/products/clientA/" is directed into the "/proyect/clients/index.php?database=clientA&module=products". In my virtual machine with linux (debian) in my PC works fine, but the server linux returns a 403 error.

But if I switch to rewrite this rule:

RewriteRule ^proyect/products/([a-zA-Z]+)$ /proyect/clients/index.php?database=$1&module=products [L,QSA]

and then write the url: "http://host/proyect/products/clientA/", works well

The permissions on "/var/www/proyect/" and sub directories, is right for apache.

thanks.

EDIT I shook my consulting to "http://serverfault.com"

initial question

A: 

You should put the .htaccess file in the docroot directory (public_html or htdocs). Example:
URL: http://example.com/somedir/somefile.php
Path: /var/www/example/htdocs/somedir/somefile.php
.htaccess should be placed in /var/www/example/htdocs/.htaccess.

When you get a HTTP 403 (or 500) error, you should look in your error logs first.

Lekensteyn