Everything just went BOOM! {htaccess}

I sure hope someone can help me out here… for years I’ve never had any issues with access.
Yesterday AM my site was fine… I checked it at lunch time and got 500 error… something in htaccess went nuts, but its odd, my host said nothing was changed on his end…
So what I did was delete the text in the htaccess file… site came back up… BUT! none of the internal links work, see for yourself if you think you can help me out here. The sites at;
http://www.rsigrowers.com/index.php?
Give a click on any category and you get a 404 error

Heres the files text for the site, (this came with the download of the cart)

<IfModule mod_headers.c>
        Header unset ETag
        FileETag None
        <FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
                Header unset Last-Modified
                Header set Expires "Fri, 21 Dec 2020 00:00:00 GMT"
                Header set Cache-Control "public, no-transform"
        </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
        RewriteEngine   On
        RewriteCond     %{QUERY_STRING} ^$
        RewriteRule     ^((.)?)$        index.php?p=home [L]

        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^(.*)$ $1 [QSA,L]

        RewriteCond     $1 !^(\#(.)*|\?(.)*|\.htaccess(.)*|\.htaccess\.back(.)*|.idea\/(.)*|.svn\/(.)*|admin\.php(.)*|content\/(.)*|download\.php(.)*|ecc\/(.)*|images\/(.)*|index\.php(.)*|install\/(.)*|login\.php(.)*|readme\.txt(.)*|robots\.txt(.)*)
        RewriteRule     ^(.+)$ index.php?url=$1&%{QUERY_STRING} [L]
</IfModule>

<IfModule mod_deflate.c>
        <FilesMatch "\.(js|css|ico|flv|jpg|jpeg|png|gif)$">
                SetOutputFilter DEFLATE
        </FilesMatch>
</IfModule>

It would help if you could put the code tags round the entire code rather than just part of it Turtleman49.

I have to say though, although I’m no .htaccess expert, your rewrite condition looks mighty strange.

I keep trying to do that but the only thing that gets entered to the quote is whats there :confused:

Not to worry.

You might find the following tutorial for mod_rewrite of some help:

Should all be sorted now.

2 Likes

Thank You for making that better for others to read :slight_smile:

Since the htaccess has worked fine since 2004 then all of a sudden this happens I’m guessing it has to be the server side of things, I’ve asked the host but they say nothing has changed…odd
IF the htaccess file is empty of text I have access but the links are dead
IF I add the default htaccess I get a fatal error #500 (server side)

I’m lost…

So what I did was delete the first $ and things seem to work right… BUT! when I refresh the htaccess it pulls the second $ and I have to delete it again. htaccess is created by the backend but I dont know where it calls from

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.