htacess with optional multiple expressions
I am in the process of writing a blogging system and am having .htaccess troubles. i have the following code:
This works fine if I have a url such as USERNAME/home, but not if I simply have the url /home which would be the default if you are not viewing blogs by a user. I think I am close, but I am not sure the exact syntax of the second rewrite.
RewriteRule ^([^/]+)/([^/\.]+)/?$ index.php?uname=$1&pg=$2 [QSA,L]
RewriteRule ^/([^/\.]+)/?$ index.php?pg=$1 [QSA,L]
If anyone could help with this issue, that would be great.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)