How to map all requests to a single file?

0

I need to map all requests arriving at the server as follows:

exemplo.com/joao  =>  exemplo.com/index.pl?u=joao
exemplo.com/joao/ =>  exemplo.com/index.pl?u=joao

My /var/www/.htaccess file is so far:

RewriteEngine On
RewriteRule ^([a-zA-Z0-9\_\-]+)\/?$ index.pl?u=$1

In normal cases, the rule works. But it fails in case the /var/www/joao directory exists.

I need the URL to be transformed even though the joao directory exists. Anyone have any ideas?

    
asked by anonymous 02.06.2015 / 19:45

1 answer

-1

Very good. now I have a web server and another application server running jboss. my requests go through the web server. I wanted to make the url friendly but it was giving error

    
18.03.2016 / 14:35