Options +FollowSymlinks RewriteEngine on RewriteRule ^img/([0-9]+) imgpopup.php [L] RewriteCond %{REQUEST_URI} !^/img_upload/ RewriteRule ^([A-Za-z0-9_]+)/?$ index.php?a=$1 [T=application/x-httpd-php,L] RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/?$ index.php?a=$1&b=$2 [T=application/x-httpd-php,L] RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/?$ index.php?a=$1&b=$2&c=$3 [T=application/x-httpd-php,L] RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/?$ index.php?a=$1&b=$2&c=$3&d=$4 [T=application/x-httpd-php,L] RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/?$ index.php?a=$1&b=$2&c=$3&d=$4&e=$5 [T=application/x-httpd-php,L] RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/?$ index.php?a=$1&b=$2&c=$3&d=$4&e=$5&f=$6 [T=application/x-httpd-php,L] RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/?$ index.php?a=$1&b=$2&c=$3&d=$4&e=$5&f=$6&g=$7 [T=application/x-httpd-php,L]