Hello all,

I'm not being able to implement a RewriteRule in apache and would like
some help of you.

I want all access to files in a specific directory to be done through a
php script. For example, if the users access doc/node1.html, I want it
to be changed to doc/script.php?fileName=node1.html

I've tried many things and got no success. Sometimes I god bad request
error. On others the browser seemed to be in loop.

First, I thought it was going to be something like:

Alias /docs "/home/http/docs/"
<Directory /home/http/docs>
        RewriteEngine On
        RewriteRule ^(.*)$ script.php?fileName=$1
</Directory>

But I was wrong. I got an error like:
"The requested URL /home/http/docs/script.php was not found on this
server."

Without the rewrite rule I can access the script with no problems.

I would really appreciate any help.

Thanks,
Joao.


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to