Forum Moderators: phranque
For more information, please see our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
I have for the file and dir stuff something like:
RewriteEngine on
RewriteRule ^(.*)\.html $1\.php
RewriteRule ^([^/]*)/([^/]*)$ /index.php?categorie=$1 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?categorie=$1¶m1=$2 [L]
This gives some strange behavior.
I now want to do it as follows:
RewriteRule ^(.*)$ index.php?path=$1
<?
$path = $_GET['path'];
$path_parts = explode("/", $path);
$reversed_path_parts = array_reverse($path_parts);
$file = $reversed_path_parts[0];
$last_dir = $reversed_path_parts[1];
?>
But for some reason the RewriteRule doesn't work..