Jump to content

Can I use Wildcard DNS to create subdomain for each my user?


Recommended Posts

Posted

Try this to pass the url to index.php:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{HTTP_HOST} ^(.+?)\.masaeng\.ga$
RewriteRule ^.*/?$ /index.php?u=%1&a=$1 [L]
Then in index.php you should be able to get the url like this

$query = $_SERVER['QUERY_STRING'];
Posted

Its looks like nothing changed with the url..

 

I mean is not how to get the url but how to keep the url from being ignored

the url like main.masaeng.ga mean => /index.php?u=main

 

If i write main.masaeng.ga/whatever/here/a.php?b=c it still read the url as /index.php?u=main

 

So its just can read the front one

 

Sorry if my words is less clear

 

Any solutions please..  :(

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...