views:

85

answers:

2

Hey everyone,

I am new to URL rewriting and I have an .htaccess file that looks like this:

RewriteEngine On
RewriteRule     /*\.(css|js|gif|png|jpe?g)$ - [NC,L]
RewriteRule "^(.*)$"    "www/index.php?_url=$1" [QSA,L]

Does this code just rewrite the code internally, or is it supposed to change to URL in the address bar? As of now it does not change the address bar, and I'm not really sure yet but I am thinking that I will probably want the option to do so for bookmarking purposes. So if there is a way could you please let me know or direct me to a pretty noob friendly guide on URL rewriting where I can figure it out on my own because I haven't been able to find one.

Thanks for the help!

+3  A: 

As it stands, it will just do an internal rewrite. To redirect the user (thereby changing their address bar), add R to the flags (e.g. [NC,R,L] or [R,QSA,L])

Dave
+2  A: 

URL rewriting is completely server-side (unless you do a redirect). The client (and thus their address bar) will not know what the server is doing with the URL.

Here's a good beginner tutorial that explains URL rewriting and goes through progressively more complex examples.

Ben S