[eluser]Daniel Moore[/eluser]
[quote author="Iverson" date="1242769350"][quote author="Daniel Moore" date="1242416764"]
If you've got a host that doesn't give access to .htaccess, you need to change hosts. There are bound to be much more serious issues than a lack of .htaccess there. Those hosts may be fine for putting up a single, personal web page in HTML only, but would not be acceptable for setting up PHP applications, IMHO.[/quote]
Not necessarily. No one is arguing about the efficiency of having a shared host that allows .htaccess files. Vangelis is simply giving a much more universal solution. [/quote]
I understand having a more universal solution. I'm all for ways to do things that do not depend on the host. It is always a good idea to have a backup way of doing things that will be universal. I have even filed the hook method away, just in case, but will continue to use the .htaccess as long as it is not a problem to do so.
However, what I was stating was that if the host so restricts .htaccess that you can't do a simple redirect, then this host is going to be too restrictive to allow full-blown PHP applications to run smoothly.
I've only dealt with one host in the last 6 years that did not allow .htaccess, and they didn't support PHP either. It was for a plain HTML site for a relative. It was free for them, so the price was right.
In today's marketplace, if a hosting provider cannot provide a way to do a redirect with a .htaccess file given the competition in the market, that host probably won't survive long. Better to find a host that is being competitive. That's host shopping advice, not coding advice, and it's good advice.
I didn't go into that part of it further because it's really not on topic.
On another note, if you're just developing an application for distribution/sales to people who may want an install script but may not be able to tweak a .htaccess file, then the hook method would definitely be the one to go with.