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..  :(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...