LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Bug Reports (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=9)
-   -   [solved] .htaccess doesn't work (http://www.litespeedtech.com/support/forum/showthread.php?t=6352)

LiteSpeeder 11-09-2012 03:52 PM

[solved] .htaccess doesn't work
 
Hello,

i'm using Litespeed Web Server - Enterprise Edition - Version 4.1.13 and i have some problems with .htaccess files. I created a /test/ subfolder and put a .htaccess file with garbage in it (like asjdasdnasdnasdnasklda) but the files in the directory are still accessible. I switch to apache and it gives me error 500 when i try to access /test/. Can you please help me?

Thanks

LiteSpeeder 11-09-2012 04:14 PM

btw, all checked except None

Allow Override Limit Auth FileInfo Indexes Options None

restarted lsws and i sow the line below in the log:

2012-11-10 02:15:48.263 INFO [HTAccess] Updating configuration from [/home/xxx/public_html/test/.htaccess]

LiteSpeeder 11-09-2012 04:23 PM

Upgrading to Litespeed Web Server Enterprise v4.2 didn't help either.

NiteWave 11-09-2012 06:57 PM

Quote:

put a .htaccess file with garbage in it (like asjdasdnasdnasdnasklda)
this may be ignored by the web server.

try put following in .htaccess

RewriteEngine On
RewriteRule .* - [F,L]

so /test/ is not accessible through browser.

LiteSpeeder 11-10-2012 03:24 AM

Hmm, this worked. However, what i'm trying to achive is to set default encoding to UTF-8.

I created two files; "test.php" and "test.js" in /test/. The content is "This is a test file".

Server header check gives:

HTTP/1.0 200 OK =>
Date => Sat, 10 Nov 2012 11:18:46 GMT
Connection => close
X-Powered-By => PHP/5.2.16
Content-Type => text/html; charset=ISO-8859-9
Content-Length => 28

Adding the lines below to .htaccess do not make any differences:

AddDefaultCharset UTF-8

<filesMatch "\.(htm|html|css|js)$">
ForceType 'text/html; charset=UTF-8'
</filesMatch>

<filesMatch "\.(htm|html|css|js)$">
AddDefaultCharset UTF-8
</filesMatch>

AddCharset UTF-8 .html .php .js


I am aware that the default encoding in php.ini is set to ISO-8859-9 but it must be possible to override this value.

LiteSpeeder 11-10-2012 04:15 AM

I fixed my problem. It was not .htaccess related. Thanks for your reply.


All times are GMT -7. The time now is 05:02 PM.