SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What could cause this rules to fail?

    Hello,

    Trying to configure a ZF application.

    .htaccess is pretty straight-forward:

    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    php_flag magic_quotes_gpc off
    php_flag register_globals off
    I always get a 500 error. Commenting out lines didn't help me with finding where exactly the error occurs.

    I'm at a loss of ideas.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,680
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    rh,

    First thought is that there is a syntax error. Since a RewriteRule REQUIRES both regex and redirection, that's likely your problem (first RewriteRule).

    Second, I can't believe that you can comment out the entire .htaccess and you're still getting a 500 error so there may be something else in play other than your .htaccess (somewhere else on the server). I think you should comment out every line (#) then remove, one at a time starting with the php_flag directives first, then RewriteEngine on and the first rule set and, finally, the last RewriteRule. At least that's what I would do.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •