Forum Moderators: phranque
RewriteRule ^([^/]+)/$ index.php?dir=$1 [L]
RewriteRule ^([^/]+)/(.+)\.html$ index.php?dir=$1&file=$2 [L]
This works very good for:
[subdomain.domain.nl...]
and
[subdomain.domain.nl...]
, it doesn't work for
[subdomain.domain.nl...]
I want,
[subdomain.domain.nl...]
be redirected to:
[subdomain.domain.nl...]
Is that possible?
Am I right in thinking that /dir/ doesn't 'physicaly' exist and is only in your database?
If so then you probably have a way of telling that it is a 'directory' - a boolean flag or something? Using that you can redirect it within your scripting language and restart the process - eg in php something like
if ($is_directory) {
$new_url="http://servername/".$full_url."/");
header("HTTP/1.0 301 Moved Permanently");
header("Location: http://".$new_url);
die(); //or not...
}
Otherwise you're trying to detect something in a database from somewhere that can't see your data,
hth,
Andy