I can't seem to obtain the second part of the url slug. I currently have my .htaccess file like this:
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?id=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?id=$1
And get this:
http://example.com/user/john
And now can't get this to work:
http://example.com/user/john?o=last
How can I obtain $_GET['o']
?
Replace your code with this:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z0-9_-]+)/?$ /index.php?id=$1 [L,QSA,NC]