View Full Version : Any difference between Mod ReWrite and real subdomains
Hypertext
10-07-2008, 02:00 AM
I don't know, I prefer it cleaner. using images.x.com instead of x.com/images
is there any real difference? if I just reroute a few subdomains in the root.
Dentafrice
10-07-2008, 02:04 AM
mod_rewrite and subdomains.. are two different things.
A subdomain is really just a slave zone of the master zone.
example.com is a subdomain of com
www.example.com is a domain of example.com
mod_rewrite is a totally different thing, not dealing with DNS at all. mod_rewrite is just Apache's rewrite engine.
It just modifies a URL's appearence, not the actual serving of a domain..
Hypertext
10-07-2008, 02:21 AM
Hmm. It's just I'm going to be doing a lot of stuff in SVN and don't know if it's worth the hassle of keep changing servers. Maybe I'll just upload my tools on a subdomain (trac, pb, svn, etc..) and then use mod rewrite for my other folders whichi will be portrayed as subdomains.
Nice plugin.
Dentafrice
10-07-2008, 02:38 AM
Hmm. It's just I'm going to be doing a lot of stuff in SVN and don't know if it's worth the hassle of keep changing servers. Maybe I'll just upload my tools on a subdomain (trac, pb, svn, etc..) and then use mod rewrite for my other folders whichi will be portrayed as subdomains.
Nice plugin.
I don't think you have a clue what you are on about, you are really mixed up..
Hypertext
10-07-2008, 02:50 AM
Explain.
Source
10-07-2008, 09:36 AM
the rewrite module is commonly used to capture a part of a url for example
http://yoursite.com/go/pie
and then place it behind the scenes for example, in front of .php . That would then make the server load pie.php and display it whilst the URL remain /go/pie . I think on that basis was the reason as to why caleb thought you were confused between the 2.
I may be wrong, not knowing its full potential - but I hope you get the jist of it.
Dentafrice
10-07-2008, 01:13 PM
mod_rewrite allows for modification of the URL, not seen by the client.
They type: http://www.example.com/test and they get -> /test.php
They type: http://example.com and they get a 301 -> http://www.example.com
They type: http://www.example.com/testing/123 they get -> /bla.php?id=$1
It is a lot more then that, those are just some simples uses of it.
----
Subdomains, are actual DNS zones, just like domain names, which is why they have to propagate as well.
Some common subdomains:
www.example.com
mail.example.com
ftp.example.com
Each one of those, are a slave zone added on the master zone.
EX:
When you request www.example.com
1. It finds out which DNS TLD server manages com.
2. It finds out which DNS server manages example.com
3. It finds out which DNS server manages www.example.com
When you request en.us.example.com
1. It finds out which DNS TLD server manages com.
2. It finds out which DNS server manages example.com
3. It finds out which DNS server manages us.example.com
4. It finds out which DNS server manages en.us.example.com
Very different.
RichardKnox
10-07-2008, 07:26 PM
If I remember you can create a subdomain using mod_rewrite, but it requires a secondary domain (not 100% sure). Ask JH as he did it previously on habbopress.
Dentafrice
10-07-2008, 07:27 PM
It doesn't work on all servers though, and I think it requires wildcard catch all.
RichardKnox
10-07-2008, 07:57 PM
It doesn't work on all servers though, and I think it requires wildcard catch all.
Yeh I don't think it's a surefire solution. You're better off either setting up proper subdomains, or just leaving as a directory.
Dentafrice
10-07-2008, 08:01 PM
Just read up on it, it is impossible without your host enabling wildcard domains. Then catching the domain with htaccess and rewriting it.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.