Tags » Htaccess

Redirect All HTTP to HTTPS in Wordpress with .htaccess

I recently had a request from a client to transfer all web traffic on some WordPress site (www or no www) to all be forced over HTTPS. 188 more words


How to Remove .php, .html Extensions with .htaccess File

An .htaccess file is a simple ASCII file that you can create with a text editor like Notepad or Notepad++ . It provides a way to make configuration changes on a directory/folder. 474 more words


Block spam comments and hacking attempts via .htaccess

deny from
deny from
deny from
deny from
deny from
deny from
deny from
deny from
deny from… 6,382 more words

Bad Bot

How to increase speed of your website


ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"

# Set Pragma header
Header set Pragma "public"
# Set Cache-Control header
Header append Cache-Control "public, must-revalidate, proxy-revalidate"

# Set Entity Tag header
FileETag MTime Size

# END Headers: Ensure client-side caching of objects

Header unset Pragma
FileETag None
Header unset ETag

How to .htaccess

Basically what I wanted to do was,
to redirect the to
So that the user have to type a little less.

This is what I did to make that happen. 169 more words

How To

How to Include PHP inside JavaScript (.js) files

When programming in JavaScript, it can be very useful to use PHP within js files, for example, to retrieve data from a database. Here is a snippet that allows the use of PHP in JS files. 25 more words

How to remove .html from URL

To remove the .html extension from your urls, you can use the following code in root/htaccess :

RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.html
RewriteRule ^ /%1… 15 more words