[solved] .htaccess doesn't work

Discussion in 'Bug Reports' started by LiteSpeeder, Nov 9, 2012.

  1. LiteSpeeder

    LiteSpeeder New Member

    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
    Last edited by a moderator: Nov 11, 2012
  2. LiteSpeeder

    LiteSpeeder New Member

    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]
    Last edited: Nov 10, 2012
  3. LiteSpeeder

    LiteSpeeder New Member

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

    NiteWave Administrator

    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.
  5. LiteSpeeder

    LiteSpeeder New Member

    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.
    Last edited: Nov 10, 2012
  6. LiteSpeeder

    LiteSpeeder New Member

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

Share This Page