Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^profile/(\w+)/*$ ./index.php?page=showuser&username=$1
Okay, so I have this code that will rewrite my URL exactly how it want it to (sitename/profile/username).
Now let’s say I want to access only (sitename/profile/). What rule do I have to write in order for that to work and not give me an error?
I am new to mod rewrite so I am sorry if this question seem stupid to some of you.
The dollar at the end matches the end of the URL. In this case, there cannot be anything else after
profile/