Category: Apache directives
-
Fix Error Too Many Redirects on WordPress Admin page or Blog
There are several cases for the cause and multiple solutions also: 1 Add these 2 lines in wp-config.php file 2 Edit these settings in database directly using PhpMyAdmin in table options or wp_options in option_id, option_name (1,siteurl) and (2,home) 3 You can do the same by Editing wp-config.php and adding these 2 lines 4 Fix…
-
Common PHP.ini directives list for Apache htaccess files
Maximum Execution Time and Maximum Input Time Max Upload file size and Max POST data size Output buffering toggle Expose PHP signature – toggle Maximum Input variables Maximum Memory Limit for PHP Magic Quotes toggle Register Global Variables – useless now Allow remote URL in fopen Max Execution Time for php scripts Set Timezone for…
-
Default .htaccess file for wordpress with compression and caching tweaks
Here is the default .htaccess file for wordpress If you are using cpanel, before you proceed make sure that you don’t have htaccess file already. Default File Manager settings in cpanel make it hidden .htaccess file – default code for wordpress If your WordPress Installation is inside a directory say knowledge, which means your wordpress…
-
.htaccess redirect from http to https and from non-www to www redirect – Make site permanently SSL secured
put this in your htaccess file:
-
Forcing website to https and www using htaccess on apache servers
To first force HTTPS, you must check the correct environment variable %{HTTPS} off, but your rule above then prepends the www. Since you have a second rule to enforce www., don’t use it in the first rule.
-
How to secure a folder by whitelisting one IP using HTACCESS and denying all others
The process involves matching all requests for an IP, if the IP does not match redirect all secured directory requests. If you want to control this IP using a script, you can add 2 lines ###CUSTOM RULES### # your rules will appear here using php script ###CUSTOM RULES### Now add a script, say happy.phpand use…