Add the code “SetEnv TZ America/Los_Angeles” in your htaccess file
Monthly Archives: December 2011
Invalid Redirect URL After Upgrade
NOTE : I do not recommend this solution . Though you can follow this temporarily.
I have fixed this issue by commenting the below given code from the page includes>functions.php.
if (!$foundurl) {
eval(standard_error(fetch_error(‘invalid_redirect_url_x’, $vbulletin->url)));
}
Limiting number of simultaneous connections
Add the code in your .htaccess file in to limit the number of simulatious connections
General Format : MaxClients
Example : MaxClients 5
.htaccess – Usage
- Rewriting URLs
- Customized error responses
- Authorization, authentication
- SSI
- Directory listing
- Blocking
- MIME types
- Cache Control
.htaccess
A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration.The original purpose of .htaccess – reflected in its name – was to allow per-directory access control, by for example requiring a password to access the content. Nowadays however, the .htaccess files can override many other configuration settings including content type and character set, CGI handlers, etc.These files are placed inside the web tree, and are able to override a subset of the server’s global configuration for that directory, and all sub-directories
Protect a file using .htaccess
Add the below given code in your .htaccess file
<files filename.php>
order allow,deny
deny from all
</files>
Blacklist IP addresses
You can blacklist IP addresses using the below given code in htaccess file
General Format
=========
order allow,deny
allow from all
deny from xxx.xxx.xxx.xx
Example
=====
order allow,deny
allow from all
deny from 115.100.22.11
Column 'ID' in field list is ambiguous
it is just because you have 2 tables with both a field ID, so the database engine will get confused about the table name from which the the data to be fixed
Use table1.id, or table2.id, based on the table you want the data
How to speed up your site using .htaccess
You can speed up the site by enabling file caching General Format <FilesMatch “.(Extenstion of the file to be cached)$”> Header set Cache-Control “max-age=cache time″ </FilesMatch> Example <FilesMatch “.(html|htm)$”> Header set Cache-Control “max-age=43200″ </FilesMatch
Protect your site from hotlinking
You can protect your site from hotlinking by adding the below given code in your htaccess file .
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://([ -a-z0-9] .)?domain.com [NC]
RewriteRule .(gif|jpe?g|png)$ – [F,NC,L]