var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
How to limit html parsing to .htm, .html files only
Hello! My webserver treat ALL files with html tags inside as html files, e.g. text files or EVEN files without extension.
How to only allow .htm, .html files?
I've deactivated temporary mime magic, I also tried with some RemoveHandler, AddType lines but nothing
Someone could help me?
AddType application/x-httpd-php .html .htm
I already tried that but not working. I should find a way to limit parsing, not to addtype again.
This is the one you want...
AddType text/html .html .htm
Techinically its the web browser and not the server. The server just tells the web browser what type of data it is providing.
The web browser then decided to render it as html
This should fix it so it is processes .txt files as as plain text by the web browser.
Repeat this for any other files you want to appear as plain text.
AddType text/plain .txt
Originally Posted by
Sadly, not working Thanks anyway!
Btw, I need a solution for files without extension to not be processed as html if they content html code.
It's a pitty. Maybe you need little script for your needs? Also try to contact your webhosting support. Maybe they will be able do that on your webserver?
Lol, I'm the administrator of my servers.
There is a little trick (or maybe not?) for that. If someone could tell me how to stop parsing files without extension, with html code inside, as html files, I'll be grateful. My scanners do not check those files and abusers bypass my filters with files without extension.
Stop those kiddy replies like 'ask your webhosting support' or 'you need a little script' because I'm not so stupid and also I'm sure it's not very easy to make it. But there is a trick and I don't know it.
I forgot, I have apache 2.0.5x.
I think doc_flabby is right. Your server is probably sending the correct content-type but IE is showing it as html. Use Mozilla to demonstrate correct content type support.
There's no way to avoid it, really, since that's what IE does. What, exactly, are you trying to prevent abuse of?
You can verify the headers that your server is sending at web-sniffer[dot]net
this is one of those tricky problems.
host2020 is correct i think this problem is IE specific:
One workaround would be to use
AddType application/octet-stream .txt
This will serve up the files as binary files. Which means they may popup to download, i havn't tested this....