Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: .htaccess blues  (Read 4624 times)

ens

  • Sr. Member
  • ****
  • Karma: 12
  • Posts: 279
    • http://www.meatysite.info
.htaccess blues
« on: November 16, 2007, 10:47:38 pm »

I'm trying to run a script alongside sNews on a server of which I don't have access to and cannot change settings, etc. etc.

In my .htaccess file I put one line
Code: [Select]
# gzip compression (no text/html because we have PHPs that output JPEGs)
AddOutputFilterByType DEFLATE text/css application/x-javascript application/javascript text/javascript text/xml application/xml
But I get an internal server error 500. The server's error report says "[Fri Nov 16 15:37:09 2007] [alert] [client **.***.***.**] /home/*******/public_html/pp2/.htaccess: Invalid command 'AddOutputFilterByType', perhaps mis-spelled or defined by a module not included in the server configuration

so I then decided to try to see if it worked having had been replaced with;
Code: [Select]
<Location /cgi-bin/>
Options Includes
AddOutputFilterByType INCLUDES;DEFLATE text/css application/x-javascript application/javascript text/javascript text/xml application/xml
</Location>
but I get another 500 error... and this is what the server's error log says: "Nov 16 15:37:57 2007] [alert] [client **.***.**.***] /home/*******/public_html/pp2/.htaccess: <Location not allowed here"

Of course it is a subdomain, but as you know they are located in a folder under public_html... etc etc.

Now I don't understand why the supposed workaround from not using mod_deflate (which has been "deprecated" according to apache's website) is not working either. Or am I doing something wrong?
Logged

ens

  • Sr. Member
  • ****
  • Karma: 12
  • Posts: 279
    • http://www.meatysite.info
Re: .htaccess blues
« Reply #1 on: November 19, 2007, 09:56:26 pm »

Okay, so since I've had like 3 days to work on it... I found out that mod_deflate is not installed on this apache server. There is no workaround, so I just comment out the file completely in the .htaccess file.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: .htaccess blues
« Reply #2 on: November 20, 2007, 01:48:59 am »

Bummer, eh?  :P
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ens

  • Sr. Member
  • ****
  • Karma: 12
  • Posts: 279
    • http://www.meatysite.info
Re: .htaccess blues
« Reply #3 on: November 22, 2007, 11:51:51 pm »

Yes, keys it is. :|

But for others' information... here are some .htaccess tips.

When dealing with Options, always use + and - symbols when dealing with more than 1 option, because it won't work otherwise (also notes so on the apache website.).

Most hosts don't allow php to be run in htaccess because they are running phpexec. So if you're stuck, look for things like php_flag, etc. in your .htaccess file.

That's all for me.

P.S. I got the script working in the end.
Logged

invarbrass

  • Full Member
  • ***
  • Karma: 18
  • Posts: 117
    • http://snews.extremebittorrent.com
Re: .htaccess blues
« Reply #4 on: February 11, 2008, 03:58:02 pm »

You could use output buffering with gzhandler and see if it works.
Logged