SEO Class in Chicago, IL
Are you a Google Analytics enthusiast?
More SEO Content
Web Forwarding Vs 301 Redirect
Posted 22 September 2003 - 09:51 PM
The problem with this method as I see it is that the URL in the browser is still www.differentdomain.com. So while the content found belongs to www.yourdomain.com the log files will report traffic to www.differnetdomain.com.
I'd be interested in anybody's comment on this method. Pros or cons?
Posted 22 September 2003 - 11:47 PM
What you're suggesting would probably work, at least if you could ever find a directory called www.yourdomain.com (it's probably closer to /home/yourdomain/www), but is needlessly complicated and relies on the operating system. Symlinks also introduce the (slight) potential for permission conflicts and security breaches. What you want to accomplish can just as easily be accomplished using just Apache directives, meaning it will work across the OS board.
Apache calls /home/yourdomain/www the DocumentRoot, and it's defined in a VirtualHost block of your htppd.conf file. It might look like this:
So? Just create a new VirtualHost block for differentdomain.com and point it to exactly the same DocumentRoot. It's not any more complicated than that.
Actually, it can be even simpler.
The impact? Judge for yourself. Chances are one of these two techniques is what your server is using to allow access to both domain.com and www.domain.com, so everyone should already have plenty of experience with it.
Posted 23 September 2003 - 03:08 PM
In fact it's not. My guys are using the symlink method to alias mydomain.com to www.mydomain.com. That is specifically why I asked the question. I will have them read your learned reply, because the cost of this method is that you do lose some traffic reporting.
Chances are one of these two techniques is what your server is using to allow access to both domain.com and www.domain.com, so everyone should already have plenty of experience with it.
<late addition> For what it is worth Ron the path to all web sites on our FreeBSD server is /usr/local/www/data/www.yourdomain.com. We also put the non-www subdirectory/file here also. So for instance in the case of our own company domain we have /usr/local/www/data/www.compar.com and this is where all the files are actually kept. And we have /usr/local/www/data/compar.com which is symlinked to the "www." folder.
Edited by compar, 23 September 2003 - 03:19 PM.
Posted 23 September 2003 - 03:26 PM
If so, that's a separate issue (though not necessarily unrelated). Your log files are also defined within httpd.conf, though they may or may not be within the VirtualHost blocks. Lots and lots of possible variations here. If your symlinked domain is not already writing to the same log file as your main domain, thereby causing your loss of traffic reporting capability, chances are my first example above wouldn't change anything for you.
The second example, however, using the ServerAlias directive, will.
Posted 23 September 2003 - 08:54 PM
And once again what you say make sense. I'll discuss it with the guys in the morning. The symlinks have never failed us and maybe all we have to do is make sure they report into the same log file as the www. version of the domain.
Damn it I hate it when you are always so smart.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users