What I am trying to do is based off of code I've seen on here but I need to take it a step further. The 1st one allows people to put in http://www.thesite.com/username and it will load their profile without changing the URL.
Now the 2nd one is a little more trickier. What I want to have is:
http://www.thesite.com/username/blog/
which points to:
http://www.thesite.com/users/blog.php?name=$1
Where $1 would be the username to look for.
The 3rd one would be a lot more trickier with:
http://www.thesite.com/username/blog/th ... ntry_title
which points to:
http://www.thesite.com/users/blog.php?name=$1&blog=$2
Where $1 is the username and $2 would be the blog entry title that I can search for.
I have the following code in my htaccess file:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ /users/profile.php?name=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/$ /users/blog.php?name=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ /users/blog.php?name=$1&blog=$2 [L]I'm a little at a lost as everything I've learned from doing these is based on what other's have done. And I have yet to find a multi-level rewrite rule nor do I fully understand them. So both of those combined makes for a very confused person.
Any help is absolutely, greatly appreciated.
Thanks. Cent.