Hey All.
Im using this code in my .htaccess file >
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-F
RewriteRule ^(.*)$ /index.php?p=$1 [QSA]
And this in my index.php where my content should be included >
<?
if (isset($_GET['p']) && !empty($_GET['p'])) {
$page = $_GET['p'];
} else {
$page = "news/nyheder";
}
if (eregi("/$",$page)) {
$page = substr($page,0,strlen($page)-1);
}
$filename = "/customers/madsass.dk/madsass.dk/httpd.www/".$page.".php";
if (file_exists($filename)) {
include($filename);
} else {
include("/customers/madsass.dk/madsass.dk/httpd.www/404/index.php");
}
?>
Then my question is. What should i do with my codes if i want to do this:
If i type: http://url.madsass.dk
Then, this file should be included: http://www.madsass.dk/url/index.php.
It's because i want the index.php file in url/ to be including when i'm using dir.domain.com
Thanks in advance.