Options +FollowSymLinks -MultiViews
DirectoryIndex index.php
RewriteEngine on
RewriteRule ^(.*)/$ /$1.php [L]
RewriteRule ^recent/([0-9]+)$ recent.php?page=$1
RewriteRule ^recent recent.php [L]
RewriteRule ^([0-9]+)$ paste.php?id=$1
RewriteRule ^home index.php
RewriteRule ^login login.php
RewriteRule ^changepass changepassword.php
RewriteRule ^activate activate.php
RewriteRule ^lostpass lostpassword.php
RewriteRule ^logout logout.php
RewriteRule ^register register.php
RewriteRule ^todo todo.php
RewriteRule ^cpanel cpanel.php
RewriteRule ^lock=([0-9]+)$ lock.php?id=$1
RewriteRule ^unlock=([0-9]+)$ unlock.php?id=$1
RewriteRule ^delete=([0-9]+)$ delete.php?id=$1
RewriteRule ^([a-zA-Z]+)$ user.php?user=$1
Options -MultiViews +FollowSymLinks
DirectoryIndex index.php
RewriteEngine on
RewriteRule ^(.*)/$ /$1 [L]
RewriteRule ^recent/([0-9]+)$/? recent.php?page=$1
RewriteRule ^recent$ recent.php
RewriteRule ^home$ index.php
RewriteRule ^([0-9]+)$ paste.php?id=$1
RewriteRule ^login$ login.php
RewriteRule ^changepass$ changepassword.php
RewriteRule ^activate$ activate.php
RewriteRule ^lostpass$ lostpassword.php
RewriteRule ^logout$ logout.php
RewriteRule ^register$ register.php
RewriteRule ^todo$ todo.php
RewriteRule ^cpanel$ cpanel.php
RewriteRule ^lock=([0-9]+)$ lock.php?id=$1
RewriteRule ^unlock=([0-9]+)$ unlock.php?id=$1
RewriteRule ^delete=([0-9]+)$ delete.php?id=$1
RewriteRule ^([a-zA-Z]+)$ user.php?user=$1
<?php
#grab the url that .htaccess has passed to it
$url = $_SERVER['REQUEST_URI'];
#break up the slashes, example, network-13.com/newthread/1111111111
$urlparts = explode("/",$url);
#in this example
#$urlparts['0'] =
#$urlparts['1'] = newthread
#$urlparts['2'] = 1111111111
#now you can start showing different content depending on which variables have been passed via the url
if($urlparts['1'] == "register"){
register stuff here
}elseif($urlparts['1'] == "login"){
login stuff here
}elseif($urlparts['1'] == "profile"){
#example - http://network-13.com/profile/Chris
$user = $urlparts['2'];
#$urlparts['2'] is the username, so you'd check if that user exists then show the profile
}
?>
$_SERVER[REQUEST_URI]
$GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"];
$urlparts[0]
<title>
<?php
if($urlparts['1'] == "login"){
echo "Login";
}
?>
</title>