I'm writing a PHP application.
The problem is that I set it to use a .htaccess file for redirection.
On my shared hosting account, and unfortunately the .htaccess file is completely ignored. Is this a problem on my host's part?
Thanks,
Fizzman!
| SitePoint Sponsor |
I'm writing a PHP application.
The problem is that I set it to use a .htaccess file for redirection.
On my shared hosting account, and unfortunately the .htaccess file is completely ignored. Is this a problem on my host's part?
Thanks,
Fizzman!
The first question has to be: Do you know if your hosting company has .htaccess set up?
Next: Try this article. http://www.javascriptkit.com/howto/htaccess.shtml I haven't read it all but it was recommended in my hosting company's knowledge base.
Cheers,
Marcus
p.s. Where in Australia?
.htaccess file for redirection?
.htaccess stores info about authorized users, groups and passwords. i dont think u can use it for redirecting but maybe i'm wrong...
actually it's question of the apache's config whether or not .htaccess will permit or prohibit sth. maybe u have to give the file a different name. ask your provider.
cheers, jens
Thanks guys for the responce.
I was really in a rush to type that up. So i'll explain more here.
I'm developing a PHP application, and as part of the package, I use a .htaccess file in the root directory of the scripts. What's in the .htaccess is irrelevant at this time (As I know it has nothing to do with the contents of it!), and it may just confuse things here. I've tested it om multiple servers, and for some strange reason, it doesnt work on one of the servers. The .htaccess file is completely ignored. They all use Apache, by the way.
Anyway, the software needs to have the .htaccess working. (Yes, as far as I know, this means it isn't compatible with IIS servers. Well that isn't of concern to me.) I'm more concerned about servers running Apache, but not being able to use it because they cannot use .htaccess!
What do you think? Should I worry about this (and find another way around it, instead of using .htaccess files) ? Or should I continue to use .htaccess ?
PerthOriginally Posted by marcus
![]()
well, probably this server uses a different config file. check out httpd.conf. there's a detailed documentation of .htaccess in the apache docs at http://httpd.apache.org/docs/howto/htaccess.html
or copy the config file from a working server to the one that denies the job...
from the docs:
Troubleshooting
When you put configuration directives in a .htaccess file, and you don't get the desired effect, there are a number of things that may be going wrong.
Most commonly, the problem is that AllowOverride is not set such that your configuration directives are being honored. Make sure that you don't have a AllowOverride None in effect for the file scope in question. A good test for this is to put garbage in your .htaccess file and reload. If a server error is not generated, then you almost certainly have AllowOverride None in effect.
If, on the other hand, you are getting server errors when trying to access documents, check your Apache error log. It will likely tell you that the directive used in your .htaccess file is not permitted. Alternately, it may tell you that you had a syntax error, which you will then need to fix.
good luck
Last edited by jensr; May 6, 2003 at 05:42.
Thanks jensr!
Unfortunately, like most people, I do not have access to the http.conf file, as I am on a shared account.
Apart from asking my host to change it, I don't suppose there is something else that I can do?
Anyone?




wel what are you doing in the htaccess that you need? You might be able to do it some other way but it really depends.
You're right though, htaccess might not be universal enough for your app.
mitechie.com
"Techies just think a little differently
...at least that is what they keep telling me."
Bookmarks