URL 2.0
.htaccess
- DirectoryIndex ./index.php
- IndexIgnore */*
- RewriteEngine On
- RewriteBase /
- RewriteRule ^([0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?([0-9a-zA-Z_]*[\/]?[0-9a-zA-Z_]*)[\/]?$ http://www.exemplo.com.br/index.php?option=$1&1=$2&2=$3&3=$4&4=$5&5=$6&6=$7&7=$8&8=$9
- AddType image/gif .jpg
index.php
<?php
$i = 1;
while ($i < 9){
$var_str = explode("/",$_GET[$i]);
if ($var_str[0] <> ""){
$GLOBALS[$var_str[0]] = $var_str[1];
}
$i++;
}
unset($i,$var_str);
$option = $_GET["option"];
?>
leave a comment