If someone browses to a folder on your website that does not have an index file it will, by default, list the directory’s contents. If you have an Apache based web server you can prevent access to this folder by placing a .htaccess file within it containing the following code: Options -Indexes This can also […]
Tag: code snippet
Using OpenSSH on a Linux Server with Filezilla
On your linux server install OpenSSH if not already present. #debian apt-get install openssh-server #redhat yum install openssh-server Using Filezilla on a client enter the relavent details using the SSH protocol SFTP and user credentials setup on the server. Filezilla will ask you if you want to trust the connection and will display the rsa […]
Linux Proxy Server Setup For Internet Access
To allow global internet access through a proxy server you can add the code below to the file /etc/bash.bashrc. export http_proxy=http://10.0.4.1:3128 To have immediate effect without need for a reboot type: source /etc/bash.bashrc For temporary http proxy just type export http_proxy=”http://10.0.0.0.:3128″ Tested with Debian distros
Conditional CSS for Internet Explorer
To add stylesheets for specfic Internet Explorer versions you can add the blocks of code below to the head section of your HTML code. Make sure the code is placed beneath your main css declarations. All IE Versions <!–[if IE]> <link rel=”stylesheet” type=”text/css” href=”ie-all.css” /> <![endif]–> IE6 <!–[if IE 6]> <link rel=”stylesheet” type=”text/css” href=”ie6.css” /> […]
Stop iPad and iOS devices formatting numbers on webpage
An iOS will automatically see some numbers as telephone numbers and will format the number bypassing any css styling your website might have. You can stop this by altering the Apple specific meta tags. Place the code below in the head section of your webpage. <meta name=”format-detection” content=”telephone=no”>
Remove iOS styling on input boxes
By default html input boxes will have a inner shadow style applied on iPad and other iOS devices. You can remove this styling by adding the following css code to a html input object. -webkit-appearance:none;
Using clearfix css method when floating child elements in a div
Assigning this css class to a html container will clear any floats within it. .clearfix:after, #container:after { clear:both; content:”\0020″; display:block; height:0; max-height:0; overflow:hidden; visibility:hidden; }