SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Need help!

Hybrid View

  1. #1
    SitePoint Enthusiast Fizzman's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Need help!

    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!

  2. #2
    SitePoint Enthusiast marcus's Avatar
    Join Date
    Apr 2003
    Location
    Mid-North-Coast, Australia
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  3. #3
    SitePoint Enthusiast Fizzman's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by marcus
    p.s. Where in Australia?
    Perth

  4. #4
    SitePoint Member
    Join Date
    Apr 2003
    Location
    germany
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    .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

  5. #5
    SitePoint Enthusiast Fizzman's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 ?

  6. #6
    SitePoint Member
    Join Date
    Apr 2003
    Location
    germany
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    SitePoint Enthusiast Fizzman's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  8. #8
    SitePoint Enthusiast Fizzman's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

  9. #9
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •