Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Host supports .htaccess but NOT Mod Rewrite

Is there a workaround when your host server does not support Rewrite?

9:58 am on Apr 16, 2007 (gmt 0)

New User

10+ Year Member

joined:Sept 9, 2006
votes: 0

I'm hoping my new buddy Jim (jdMorgan) can guide me on this one (as he just solved another site issue for me in a flash). But all opinions gratefully received.

Another site I manage is hosted on Linux / Zeus. The server company informs us that they support .htaccess files, but not Mod Rewrite. There is apparently an equivalent language in Zeus with almost matching code. They offer Zeus language command to higher paying clients (my site owner has a basic service with them, so doesn't qualify).

My problem here (again) is the canonical problem. I can use the .htaccess file for a standard 301 Redirect for any old / lost / deleted files, line by line, but I can't do a more global rewrite to convert domain.com into www.domain.com etc - the server won't recognise the Mod Rewrite

Before I recommend to the site owner that they upgrade and pay more money, is there a workaround here?

For example
a. can I just list the lines one by one (fairly small site perhaps 40 pages max) and 301 Redirect them with a www. prefix?

b. for the fairly crucial domain.com to www.domain.com rewriting, with it be sufficient to 301 Redirect the domain.com/index.html to www.domain.com? Or will domain.com still try to resolve itself in its current form?

c. are there more elegant solutions? apart from just paying more or moving the site to a more cooperative and customer-focused host? The basic canonical problem has to be solved, so it may require these more drastic measures.

Thanks in advance

1:06 pm on Apr 16, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0

The problem with the Apache "Redirect" directives in mod_alias and their clones in other servers is that they can work *only* with the local URL-path (the part of the URL following the domain name). As a result, these directives cannot be used to solve domain canonicalization issues, because they cannot 'see' the domain.

Not to sound harsh --or even biased-- but your client will be happier in the long term with an Apache or (yes) an IIS server. Although the ISAPI-rewrite function for IIS is often a cost-added option, at least it *can* be installed. So bottom line is that it's time to change hosts, unless the site is already inextricably tied into Zeus.

Hosting companies know that allowing mod_rewrite will likely cost them in customer support time. As shown by a quick scan through this forum, mod_rewrite and the understanding of URL classification needed to work with it can be challenging, and there are some folks who dive in too deep, thinking that it's simple and won't require technical proficiency or knowledge of servers and the HTTP protocol. These Webmasters add to the host's support-related costs.

Many hosts have nevertheless decided to 'trust' their customers, support them, and allow use of this powerful tool despite the added support costs. I suggest finding a host that has done so -- You get what you pay for, and it's generally well worth it. There are hosts out there that provide full Apache module support, a unique IP address, *and* excellent customer support for $14.95 a month (yearly rate) on shared Apache hosting; That is downright cheap, and leaves little room for their competition's excuses. (Hmmm... I seem to have misplaced my "Be diplomatic" hat...)


4:26 pm on Apr 16, 2007 (gmt 0)

New User

10+ Year Member

joined:Sept 9, 2006
votes: 0

Really apprecaite you spending time on this - very helpful

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members