Tags » Htaccess

Rewriting URLs

  • URL Rewrite Condition
  • URL Rewrite Rule
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteRule ^(.*)/$ index.php?page_id=$1


Rewrite Conditions are the occurrences that are used to rewrite the url as per the Rewrite Rule. 25 more words


How to increase speed of your website

Open your htaccess file and paste this code in top of your file


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

… 13 more words

Ternyata semua itu karena perbedaan versi...

Sudah hampir seharian saya utak-atik program yang diupload ke server. Dimulai tadi pagi bencana itu datang…

Tiap tahun Kakek saya mengadakan acara Halal Bi Halal, tepatnya beberapa hari setelah lebaran. 556 more words

Bahasa Indonesia

Codeigniter - Placing assets folder

While many practices are followed while placing the assets folder in Codeigniter, I feel that the best place is in the root folder along with the application directory as shown below. 61 more words

Code Snippet

Remove index.php from URL in Codeigniter

Open applications/config/config.php and make the following changes :


$config['index_page'] = 'index.php';


$config['index_page'] = '';

And add the following code to a new file and save it as .htaccess inside the root folder : 21 more words

Code Snippet

Enable caching without plugin or using .httaccess file

You can enable browser caching by adding the following code to your .htaccess file:


<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/jpg "access 1 year" 76 more words


opencart non www to www adds index.php?_route_=

this time it is about opencart and seo client needs to redirect site from non www to www all time so we added rule in… 153 more words