I'm currently hosting my website on a external server (provider).
Now i'm trying to achieve the following:
I want to create for the user on my website a subdomain.
Not a 'real' subdomain, but only a nice and easy name.
For example: my website is example.com
A user has registerd on my website, his name is test.
The user can now visit his website on test.example.com.
When the user visits that site, it gets redirect to example.com/index.php/user/test.
A nice job for mod_rewrite, i think
.
So i've created the next .htaccess in the root directory.
Code:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} ([^.]+)\.example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/index.php/user/%1 [L,R=301]
But when i visit that website, it says that the website isn't found.
Did i make an error in the configuration file, or could it be an other problem i didn't think about of?