I am trying to make clean url with htaccess
I have a profile.php page and I get user domain name to display his page
now if the user for example hit www.XXXX.com/domain I will display his main page
it is equivalent to www.XXXX.com/profile.php?id=domain without htaccess file
I used this code and its working very fine
Options +FollowSymLinks
RewriteEngine On
RewriteCond %(SCRIPT_FILENAME) !-d
RewriteCond %(SCRIPT_FILENAME) !-f
RewriteRule ^(\w+)$ ./profile.php?id=$1
RewriteRule ^(\w+)/$ ./profile.php?id=$1
now I am trying to get page id and the view that the user wants to display but it didn't work
note page id and view are optional values , if didn't found in the url I will display the main page
I want the url to look like www.XXXX.com/domain/pageid/view , which is equivalent to www.XXXX.com/profile.php?id=domain&pid=pageid&v=view
This should do it: