My dillemma is this:

I have a test website that is an MVC framework I built. The test site is in a subdomain on a GoDaddy shared hosting account. The address to the test site is test.website.com and the root folder for the test site is /root/test. I had a .htaccess file to route all reqests in it but was getting 500 Internal Server Errors. When I removed the .htaccess file the home page worked but no links did. I got 404 Errors for them. I guess I need to modify my .htaccess file to get everything to work. Here is my current one"

php_flag display_errors on
php_value error_reporting 9999

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

I admit I am not very good with mod_rewrite, regex, or .htaccess so any help is greatly appreciated.

    12 days later

    I'm not particularly good with them either. I suppose GoDaddy support sucks, too?

    One thing I do know, having learned at work the last couple months. .htaccess is only meant to be in the DOCROOT ... so I'm thinking that having it in the 'test' folder might have something to do with it. Unfortunately, my server admin experience is pretty much all BSD until recently, and we didn't futz around with piddly files like .htaccess ... I just wrote code straight into httpd.conf by rearranging the magnetic traces on the disk with an electromagnetic probe 😃

      dalecosp;10988100 wrote:

      .htaccess is only meant to be in the DOCROOT

      False; you can put it in any number of folders you like. They'll get parsed recursively/hierarchically starting from the root all the way down to the directory of the file itself.

        dalecosp;10988100 wrote:

        ... I just wrote code straight into httpd.conf by rearranging the magnetic traces on the disk with an electromagnetic probe 😃

        what, no butterflies? [font=monospace]C-x M-c M-butterfly[/font] lightweight :p

        Ryan,
        did you set up the subdomain via .htaccess (looks like not) or did you use some control panel feature that GoDaddy has (I don't use GoDaddy)?

        In the latter case, you might have some conflicting and/or looping redirects going on between your .htaccess file and GoDaddy's.

        I think tech support would be the best approach here (if it's available/competent), unless you want to try to set up the subdomain with your own .htaccess file.

          a year later

          Ryan, I have exactly the same problem as you. Did you ever find a solution?
          Cheers,
          Manolo

            @: So you're getting 500 errors from your webserver? If so, what are the corresponding entries in your error log? There's no way you or any of us can know if you have "exactly the same problem," since neither you nor Ryan gave us that information.

              Hi Brad, thanks for your reply. I've been tweaking since I posted. Initially I had a 500 error, now I have a 404.
              http://manolofernandez.com/mfl
              When I click on Index I get the 404 error
              Here is my .htaccess file:

              Options +FollowSymLinks
              Options -MultiViews
              
              RewriteEngine On
              
              RewriteBase /mfl/
              
              RewriteCond %{REQUEST_FILENAME} -s [OR]
              RewriteCond %{REQUEST_FILENAME} -l [OR]
              RewriteCond %{REQUEST_FILENAME} -d
              
              RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
              
                bradgrafelman;10988111 wrote:

                False; you can put it in any number of folders you like. They'll get parsed recursively/hierarchically starting from the root all the way down to the directory of the file itself.

                Context error: what I meant to say is that .htaccess can't go anywhere BELOW the DOCROOT (with BELOW meaning towards "/"), or perhaps I should say "higher than" (with "higher" meaning towards "/") ... folder under it, yes, no problem. I was pointing out that I prefer to alter httpd.conf; as for recursive parsing by Apache, I am well aware of that fact, but didn't put it into words as I was talking UP the FS hierarchy... sorry; error in $english at line 1.

                  Write a Reply...