<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Virtual Subdomains and PHP</title>
	<atom:link href="http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/</link>
	<description></description>
	<lastBuildDate>Wed, 20 Apr 2011 18:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Sunny</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-860</link>
		<dc:creator>Sunny</dc:creator>
		<pubDate>Wed, 08 Dec 2010 14:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-860</guid>
		<description>Is is possible in Shared server Or dedicated server? Because I have a shared server and network administrator dosen&#039;t allow me to access the httpd.conf file.

Please share your views!!</description>
		<content:encoded><![CDATA[<p>Is is possible in Shared server Or dedicated server? Because I have a shared server and network administrator dosen&#8217;t allow me to access the httpd.conf file.</p>
<p>Please share your views!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Sameer</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-811</link>
		<dc:creator>Muhammad Sameer</dc:creator>
		<pubDate>Mon, 15 Nov 2010 17:42:11 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-811</guid>
		<description>Salam.
Really Nice Post Sabeen.
But It Little More Difficult For Me.
Because I Didn&#039;t Do This Before.
 This Line Is Getting Me Confused.</description>
		<content:encoded><![CDATA[<p>Salam.<br />
Really Nice Post Sabeen.<br />
But It Little More Difficult For Me.<br />
Because I Didn&#8217;t Do This Before.<br />
 This Line Is Getting Me Confused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sabeen Malik</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-495</link>
		<dc:creator>Sabeen Malik</dc:creator>
		<pubDate>Thu, 15 Apr 2010 06:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-495</guid>
		<description>right.
So you people signup, you create the directory. Now you already have a wildcard subdomain figured which lets say is sending all requests to /public_html , here you will put ur htaccess to rewrite the subdomain request to the folder in question. and for abc.com/folder, this should already work correctly.</description>
		<content:encoded><![CDATA[<p>right.<br />
So you people signup, you create the directory. Now you already have a wildcard subdomain figured which lets say is sending all requests to /public_html , here you will put ur htaccess to rewrite the subdomain request to the folder in question. and for abc.com/folder, this should already work correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mw509</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-494</link>
		<dc:creator>mw509</dc:creator>
		<pubDate>Wed, 14 Apr 2010 19:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-494</guid>
		<description>well sabeen here is what I mean.
My current hosting service permits me to create up to 200 sub domains only. the project am working on is expecting to register up to 1,000 people in its first use then more and more and more and more... I think you get the point here. now here is an example of what I need in a better explanation;

at the end of a successful registration, a directory with the selected/chosen domain name is created and user files copied into them. under normal circumstances such directories should be accessed as &quot;domainname.com/directoryname&quot; but in my case I want a php script or trick that will make people think they have a subdomain when they dnt really. so instead of entering &quot;domainname.com/subdomainname&quot; they can now enter subdomainname.domain.com or both to access the newly created directory.</description>
		<content:encoded><![CDATA[<p>well sabeen here is what I mean.<br />
My current hosting service permits me to create up to 200 sub domains only. the project am working on is expecting to register up to 1,000 people in its first use then more and more and more and more&#8230; I think you get the point here. now here is an example of what I need in a better explanation;</p>
<p>at the end of a successful registration, a directory with the selected/chosen domain name is created and user files copied into them. under normal circumstances such directories should be accessed as &#8220;domainname.com/directoryname&#8221; but in my case I want a php script or trick that will make people think they have a subdomain when they dnt really. so instead of entering &#8220;domainname.com/subdomainname&#8221; they can now enter subdomainname.domain.com or both to access the newly created directory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sabeen Malik</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-492</link>
		<dc:creator>Sabeen Malik</dc:creator>
		<pubDate>Wed, 14 Apr 2010 10:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-492</guid>
		<description>well when you add a subdomain in cpanel a folder is created for that subdomain, that is already the default behavior, so there is nothing really virtual about it.</description>
		<content:encoded><![CDATA[<p>well when you add a subdomain in cpanel a folder is created for that subdomain, that is already the default behavior, so there is nothing really virtual about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mw509</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-491</link>
		<dc:creator>mw509</dc:creator>
		<pubDate>Tue, 13 Apr 2010 13:52:14 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-491</guid>
		<description>its ll good wat y&#039;all saying. but here is wat I wanna know;is it possible to create virtual sub directories. eg when a user enters me.mw509.com it reads the &quot;me&quot; only and then looks for the directory, if t exists it displays the contents of the directory and if not it displays a notification or error message.</description>
		<content:encoded><![CDATA[<p>its ll good wat y&#8217;all saying. but here is wat I wanna know;is it possible to create virtual sub directories. eg when a user enters me.mw509.com it reads the &#8220;me&#8221; only and then looks for the directory, if t exists it displays the contents of the directory and if not it displays a notification or error message.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fouad</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-171</link>
		<dc:creator>Fouad</dc:creator>
		<pubDate>Tue, 18 Nov 2008 10:04:28 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-171</guid>
		<description>Matt Hough... You Rock! Thanks!</description>
		<content:encoded><![CDATA[<p>Matt Hough&#8230; You Rock! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hough</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-157</link>
		<dc:creator>Matt Hough</dc:creator>
		<pubDate>Mon, 20 Oct 2008 16:02:05 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-157</guid>
		<description>oh, and I forgot, you can set up the root folder of it in the subdomain creation, where you will place your php file</description>
		<content:encoded><![CDATA[<p>oh, and I forgot, you can set up the root folder of it in the subdomain creation, where you will place your php file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hough</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-156</link>
		<dc:creator>Matt Hough</dc:creator>
		<pubDate>Mon, 20 Oct 2008 16:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-156</guid>
		<description>That is a long way round to do things. let me help you make life simpler in the future..

1. login to Cpanel
2. go to subdomains
3. create a subdomain with the name *  (example *.advtise.com)
4. all done!

and as for your php code, maybe helpfull for others to use:

$exp = explode(&quot;.&quot;, $_SERVER[&#039;HTTP_HOST&#039;]) ;
$username = $exp[0];

echo &quot;you are username: &quot;. $username;


Note $_SERVER

informative post, but no need when you can just do this way.</description>
		<content:encoded><![CDATA[<p>That is a long way round to do things. let me help you make life simpler in the future..</p>
<p>1. login to Cpanel<br />
2. go to subdomains<br />
3. create a subdomain with the name *  (example *.advtise.com)<br />
4. all done!</p>
<p>and as for your php code, maybe helpfull for others to use:</p>
<p>$exp = explode(&#8220;.&#8221;, $_SERVER['HTTP_HOST']) ;<br />
$username = $exp[0];</p>
<p>echo &#8220;you are username: &#8220;. $username;</p>
<p>Note $_SERVER</p>
<p>informative post, but no need when you can just do this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.decodephp.com/2006/10/12/virtual-subdomains-and-php/comment-page-1/#comment-126</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 22 Aug 2008 01:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://decodephp.com/new2/?p=21#comment-126</guid>
		<description>Hi,

Something happened to my virtual subdomains and they no longer work. Apache and probably the entire system and server software was upgraded. The site works, but my subdomains do not. The .htaccess file was missing after the upgrade. I copied up my backup, but any subdomain entered defaults to the Apache default page as if I just setup a new account. Again, the main page loads fine for the domain.

Any areas to look? PHP files have not been updated since Feb, March, or April of 2008. The only thing that has changed was an Apache and CPanel upgrade. Not sure about PHP and MySQL, but mod_rewrite works fine since I created a link1/link2 simple test.

Thanks,

Tom</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Something happened to my virtual subdomains and they no longer work. Apache and probably the entire system and server software was upgraded. The site works, but my subdomains do not. The .htaccess file was missing after the upgrade. I copied up my backup, but any subdomain entered defaults to the Apache default page as if I just setup a new account. Again, the main page loads fine for the domain.</p>
<p>Any areas to look? PHP files have not been updated since Feb, March, or April of 2008. The only thing that has changed was an Apache and CPanel upgrade. Not sure about PHP and MySQL, but mod_rewrite works fine since I created a link1/link2 simple test.</p>
<p>Thanks,</p>
<p>Tom</p>
]]></content:encoded>
	</item>
</channel>
</rss>

