I don't know how to exactly explain what i need but i will try.
here is problem.
i bought domain, but i am using xampp and my computer for hosting.
on default if someone enter my ip it will open xampp site in htdocs/xampp,
this config is writen in htdocs/index.php file
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>
i changed $uri.'/xampp/' into $uri.'/name of my site/'
and it works, so when someone enter "name of my site.com" or my ip it will open site that i wanted.
but it will open like this "name of my site.com/name of my site" or my ip/name of my site.
and if someone type "name of my site.com/xampp" or "name of my site.com/another site" it will open different site.(site what is in htdocs folder behind that slash.)
because now i need xampp to host another site, and to forbid that type of access, how i can do something like this:
if someone type
"nameofmysite.com" to open htdocs/nameofmysite and to show to user address like "nameofmysite.com"
and if someone type
"nameofmysite.com/anothersite" to show him access denied or invalid url, but if he type some existing sub folder of my site for example "nameofmysite.com/category" to show him category of products of that site on that domain.
but i still need to have access from another domain to another site, something like:
"anothersite.com" to show him this another site.
i think this is called virtual hosting?
just to notify im on lan and i have static ip on lan, but i have access on wan through mikrotik who gain access through my isp adsl router and there on wan i have dynamic ip, but i am using some dns tool that domain seller give me to keep connection alive with my domain name. i know it is complicated but i live in crappy country.
so any help possible?