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

Web

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

PHP

Block spam comments and hacking attempts via .htaccess

deny from 5.104.241.0/24
deny from 8.28.16.254
deny from 24.114.29.162
deny from 31.210.47.0/24
deny from 31.214.153.0/24
deny from 37.139.52.0/24
deny from 41.205.22.0/24
deny from 43.252.228.0/22
deny from 46.182.106.0/24… 6,382 more words

Bad Bot

How to increase speed of your website

## EXPIRES CACHING ##

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
## EXPIRES CACHING ##

Header unset Pragma
FileETag None
Header unset ETag
Htaccess

How to .htaccess

Basically what I wanted to do was,
to redirect the http://192.168.0.129/ to http://192.168.0.129/eulearn
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
PHP

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

Wordpress