how to create a virtual or a dynamic subdomain.

Started on the old forum in August 2011 · view the original in the archive · old links redirect here

5 replies · 671 views · started 15 years ago · 1 min read

4 participants
razzbee Developer · 130 posts #1

hello,this tutorials will show you how to create a virtual or psudo subdomain.

login to cpanel
Go to create subdomain
When asked the subdomain name,put this '*'
so your subdomain name will be *.domain.com
after just test it by typing anything like eg. hdshba.domain.com ,just change anything.
finish
Wink
ba_maram_shiraz Newbie · 6 posts #2

razzbee wrote: hello,this tutorials will show you how to create a virtual or psudo subdomain.

login to cpanel
Go to create subdomain
When asked the subdomain name,put this '*'
so your subdomain name will be *.domain.com
after just test it by typing anything like eg. hdshba.domain.com ,just change anything.
finish
Wink

Very Gooood , nice tutorial , i'll use it, tnx

iBeyond Junior · 47 posts #3

if i want> domain.com/?abc=xyz to be> xyz.domain.com then? Do i need wildcard or something?

ba_maram_shiraz Newbie · 6 posts #4

iBeyond wrote: if i want> domain.com/?abc=xyz to be> xyz.domain.com then? Do i need wildcard or something?

You should create a subdomain with * name, then you should create a folder and assign name such as Test then you can access by http://test.host.com. According Post #1

nimeshka Developer · 180 posts #5

iBeyond wrote: if i want> domain.com/?abc=xyz to be> xyz.domain.com then? Do i need wildcard or something?

Yes U need wildcard subdomains....I remember once I used..U try this Bro.But i'm not 100% sure with this..

 RewriteEngine On

# Extract the subdomain part of domain.com
RewriteCond %{HTTP_HOST} ^([^\.]+)\.sri-wap\.net$ [NC]

# Check that the subdomain part is not www and ftp and mail
RewriteCond %1 !^(www|ftp|mail)$ [NC]

# Redirect all requests to a php script passing as argument the subdomain
RewriteRule ^.*$ http://www.domain.com?abc=%1 [R,L]

You better try this....

P.S. Original work is not mine and I do not remember Where I got this.

External image (may be gone)

I'm Proud to be a Sri Lankan!

iBeyond Junior · 47 posts #6

Thanks a lot 🙂 definately i'll try it... & i'm still stupid @ mod_rewrite. 🙁 any good online tutorial?? (will google it) but if you want suggest any good site, advance thanks ^^

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close