So far I\'ve done this:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?load=$1 [QSA,L]
A simple solution would be: EDIT HTACCESS
RewriteBase /
RewriteCond %{REQUEST_URI} !/signup
RewriteCond %{REQUEST_URI} !/signin
RewriteRule ^([^/]*)/([^/]*)$ index.php?load=gallery&username=$1&gallery=$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?load=$1 [QSA,L]
Now that PHP part ( for index.php ):
$load = $_GET['load'];
switch ($load){
default:
include('home.php');
exit();
break;
case 'dashboard':
include('dashboard.php');
exit();
break;
case 'about':
include('about.php');
exit();
break;
case 'gallery':
$username = $_GET['username'];
$gallery = $_GET['gallery'];
//check for the username and gallery
header("Location: your-gallery-location-goes-here");
break;
}
Hopefully it's gonna help :)