.htaccess rewrite url not showing correctly?

I want this to be when I write the following:

http://boundsblazer.com/user/joe

it processes the page internally:

http://boundsblazer.com/user/profile?usr=joe

But it keeps the old URL. However, when I write:

http://boundsblazer.com/user/joe

The url will look like this:

http://boundsblazer.com/user/profile?usr=joe

I have searched countless threads and I have no problem. The problem is, when I write my url, the url changes and makes it ugly. This is my .htaccess:

RewriteEngine on
RewriteRule ^user/([a-zA-Z0-9]+)$ http://boundsblazer.com/user/profile.php?usr=$1 [L,QSA]

      

Does anyone know what might be causing the problem?

+3


source to share


1 answer


Use this:

RewriteEngine on
RewriteRule ^user/([a-zA-Z0-9]+)$ /user/profile.php?usr=$1 [L,QSA]

      



The problem is that you are using an absolute url, not a relative url, and mod_rewrite does a redirect instead of a rewrite.

+4


source







All Articles