I am having problem with htaccess in which I want to have the same method of index.php?p='$_GET['page']' to apply for my account.php?username='$_GET['username']' in the same website. This is my htaccess code:
RewriteEngine on
RewriteRule ^inc/.*$ index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\w-]+)$ index.php?p=$1 [QSA,L]
RewriteEngine on
RewriteRule ^inc/.*$ index.php?p=account.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\w-]+)$ index.php?p=account.php&username=$1 [QSA,L]
I want the url in my page to be similar or the same like this:
www.composeplus.com/page
and when user logged in and access to their account name it should be like this:
www.composeplus.com/username
or
www.composeplus.com/account/username
Does anyone have the solution for me? thanks
www.composeplus.com/account/usernameYour .htaccess first part seems ok, second part is not needed.