LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > [solved] .htaccess doesn't work

Reply
 
Thread Tools Display Modes
  #1  
Old 11-09-2012, 03:52 PM
LiteSpeeder LiteSpeeder is offline
Senior Member
 
Join Date: Nov 2008
Posts: 65
Default [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

Last edited by NiteWave; 11-10-2012 at 10:13 PM..
Reply With Quote
  #2  
Old 11-09-2012, 04:14 PM
LiteSpeeder LiteSpeeder is offline
Senior Member
 
Join Date: Nov 2008
Posts: 65
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 by LiteSpeeder; 11-09-2012 at 04:17 PM..
Reply With Quote
  #3  
Old 11-09-2012, 04:23 PM
LiteSpeeder LiteSpeeder is offline
Senior Member
 
Join Date: Nov 2008
Posts: 65
Upgrading to Litespeed Web Server Enterprise v4.2 didn't help either.
Reply With Quote
  #4  
Old 11-09-2012, 06:57 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
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.
Reply With Quote
  #5  
Old 11-10-2012, 03:24 AM
LiteSpeeder LiteSpeeder is offline
Senior Member
 
Join Date: Nov 2008
Posts: 65
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 by LiteSpeeder; 11-10-2012 at 03:34 AM..
Reply With Quote
  #6  
Old 11-10-2012, 04:15 AM
LiteSpeeder LiteSpeeder is offline
Senior Member
 
Join Date: Nov 2008
Posts: 65
I fixed my problem. It was not .htaccess related. Thanks for your reply.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:12 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.