![]() |
What is the difference between a directory and a subdomain ?
Hi all,
I know this sounds very very lame... however I still would like to know the following. I know there is a difference between a directory and a sub domain for the purpose of SEO... Now I would like to use .htaccess as to create virtual subdomains... now I understand creating sub domains that you need the wildcard DNS to be established on the DNS side but is it the same when you setup a virtual subdomain using the .htaccess rewrite... I can create a subdomain the normal way... I can create a directory ;) example: www.prismvod.com/index.html <--- this gets index just fine :) www.prismvod.com/member-name/their-site.html (just a directory & not a subdomain) <--- will not get picked up... I will like this to be not just a directory but a virtual sub domain and I don't want to mess with the DNS wild card... I don't want to create regular sub domains but rather virtual sub domains because I do not have access to setup the wild card on the DNS server... I am using afraid.org DNS service since my webserver is on a dynamic IP connection... Since I would like to use a php script as to create virtual sub domains I would also like to know if such needs for the wild card feature on the DNS server to be accessed for the virtual sub domain... Any how-to advice is welcomed. Thanks for your interest,:thumbsup . |
Before we go any futher, why the fuck is your webserver on a dynamic IP?
For this .htaccess domain.com/blah/ > blah.domain.com redirection, you need two things, a properly configured .htacces for the mod_rewrite, and secondly you'll need wildcard DNS set up. |
I find it much easier dissipate to use a dynamic IP and its a bit more secure so hackers do not have a steady IP as to hack... does this answer your question?
I am not looking to set up a regular sub domain! I am looking to set up a virtual sub domain! my question is does the virtual sub domain require the wildcard DNS... . |
Quote:
Yes, for "virtual subdomains" you'll need to have wildcard DNS set up, and then redirect through .htaccess |
I could very well have a static Ip, but why... and your remark is really uncalled for...
|
I'll give you a free clue, web crawlers are notorious for caching DNS records for far longer than they should, which means they may continue attempting to connect to the old IP for weeks. "SEO" and "changing IPs periodically" do not mix.
|
I don't mean to be rude rowan but that is of little use to me if I want to have a site index for a long time...
Does Google index php talkback the same way as a subdomain ? Anyone? Thanks for your reply. |
Quote:
|
dissipate, actually I know a fair amount regarding SEO you smart ass... I am seeking to find stuff out that I did not know I did not know...
Perhaps you should get you head out of your ass and get of your high horse. . |
and to close our your question, if you can't enable wildcard DNS to redirect all non-defined subdomain requests to the document root , you cant create virtual subdomains through .htaccess
so sorry, the server hosted in your moms basement on the AOL dialup connection can not do what you need. |
balasubturfyooj, once again wtf are you going on about?!
|
If you cannot read the thread scottybuzz perhaps you should flush yourself down the toilet, again...
|
Quote:
Later, |
if you want to create sub domains on the fly try something like this
Options +FollowSymLinks RewriteEngine On # mod_dir fix RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^(.*\.)?([^\.]+)\.domain\.com$ [NC] RewriteCond %{DOCUMENT_ROOT}/subs/%2%{REQUEST_URI}/ -d RewriteRule [^/]$ http://%2.domain.com%{REQUEST_URI}/ [R=301,L] # strip sub subdomains RewriteCond %{HTTP_HOST} ^.*\.([^\.]+\.domain\.com)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # abc.domain.com --> /subs/abc RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC] RewriteCond %1:::%{REQUEST_URI} !^(.+):::/subs/\1(/.*)?$ [NC] RewriteCond %{DOCUMENT_ROOT}/subs/%1/ -d RewriteRule ^(.*)$ /subs/%1/$1 [QSA,L] |
Thanks Fris, just one question... do I need to mess around with the DNS wildcard ?
Thanks for your input ! |
Quote:
Still, wont work without a wildcard DNS record to point the subdomains to the documentroot of the TLD |
ya you need a wildcard, your host can set it up tho in your apache virtualhost entry just one more parameter to add to serveralias
|
Quote:
|
Easy. The main difference is that one of them has a cat in it.
The other is cat free. |
All times are GMT -7. The time now is 01:19 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123