It is easy to use .htaccess for domain canonicalisation, or for rewriting (that's rewriting and not redirecting) different domain requests to different server folders.
[ Message was edited by: g1smd 08/10/2008 05:00 pm ]
I have one client who hosts and domain is hosted by godaddy - where as I am not super fond of them and think there are better options out there, I have not had any issues
OK, first off, GD's customer service is lacking. There is no other way to say this. I know, because I've been a client for almost 4 years now, and I've had everything with them from a hosting solution for a website, to the current dedicated server I run today.
They told me that all of the domains in an account go into and share one folder.
This might be true in terms of all your domains are held in one account, so if you want to make DNS changes, for example, the domains appear in one folder in their interface.
Thus, they have one htaccess file.
To my knowledge, the only way to be using an htaccess file via them is by having a dedicated Linux server - that's why I ended up where I am today - it was important for me to be able to set up htaccess files on any domain I set up.
So, if this client has a dedicated server with GD, then simply set up each domain as normal, remove the index.html from the root (optional), and slip a dedicated htaccess into the root of each domain. Set a 301 redirect in each unique htaccess to point the user to the desired live domain.
I point all of the domains at the one folder and so the one .htaccess file operates for all of the domains, redirecting for all but one domain. It matters not, that the new HTTP request is coming back to the same folder, on the same physical server, because this time the correct domain name is being requested and the content will now be served.
but that is only one piece of what I do in the htaccess. I build sites with joomla, drupal, wordpress, etc,
They each have SEO/SEF moduals and components that require entries in the htaccess. also, each site needs its own htaccess file due to this.
this is the part I cannot get to work.
Its also complicated as they cache the file and it only updates every few hours. So I can never see my edits in real time.
to try to get around the same folder issue, I changed the / on the set up to /folder1, /folder2.
now I can install sites in their own folders and each should theoritically have their own .htaccess file.
now, are these seen as subdirectories of each domain because of the aliasing and sharing?
if that is the case, then I need
rewritebase /
correct?
or
rewritebase /folder1
and then, as godaddy processes the php files before the .htaccess, it was recommended in the GD help files that I have to direct the site on which version of the mysql db to use, so I added this to tell it to use php5 for php5 files and 4 for 4 blaa blaa.
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
but why does it process php files first?
shouldn't .htaccess come first.
why can't they just play like any normal linux server
...they do it that way to try to guide folks into getting more expensive options. Frustrate you to no end, then suggest an upsell where they manage the work for you...for another $200/month.
It's part of the reason why I have a dedicated server - and trust me, they have NO customer support. Their CS team is basically a sales filtering team.
absolutely correct, I also work with dedicted servers whenever possible.
godaddy throttles upstream and downstream bandwidth
caches the mysql
caches the .htaccess file
there are file owner ship issues
uses aliasing and redirects
websites share the same folder, imagine the file conflicts
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
You have not yet logged in, or registered properly as a member
You are a member, but no longer have posting rights.
This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.