Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • Google+
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
htaccess

Using the Apache Redirect directive

February 13, 2011 Web Servers Jesin A 1 Comment

Redirecting to another URL and passing the correct HTTP headers is extremely useful from SEO point of view if you migrate your website/blog from one URL to another. Other than redirecting to URL you can also use the redirect directive to send certain HTTP status codes when a page is accessed. The Redirect directive can be used in both the httpd.conf file as well as .htaccess file.Continue Reading…

Tags: apache, htaccess, redirect

PHP error_log .htaccess

January 17, 2011 PHP Jesin A 1 Comment

php category thumbnail

The PHP error_log setting specifies in which file the PHP script errors are logged. This setting is usually specified in the PHP configuration file php.ini which points to a file in which errors of all PHP scripts on that server are logged. It can be modified per directory basis to maintain separate logs for different set of scripts. For users on shared hosting account it is a bonus feature of being able to modify the error_log setting. Normally the error log is a single file for an entire server which is stored in one central place which is only accessible by the root user. But by modifying the error_log setting using htaccess you can have a separate error log for your web hosting account. The php_value error_log requires the php_flag log_errors to be On.Continue Reading…

Tags: htaccess, php

Redirect http to https using htaccess

November 23, 2010 Web Servers Jesin A Leave a Comment

Redirect your website from http://www.example.com to https://www.example.com using htaccess file in your Apache web server. It is crucial to collect financial and confidential information from a person through HTTP over SSL to make sure the transactions are secure. A customer cannot be asked to type https  in front of the URL each your website is visited. So you can make sure they are automatically redirected to the HTTPS version of the website each time they visit the URL.Continue Reading…

Tags: htaccess, redirect

Redirect non www to www

November 20, 2010 Web Servers Jesin A Leave a Comment

http status code redirect 301

This article explains how to redirect your website from the non www url to the www url but editing the .htaccess file. This is necessary because search engines think that example.com and www.example.com are different websites. But since they both have the same content it might work negatively on the search engine ranking. So it is better to redirect example.com to www.example.com doing so this sends HTTP 301 status code when a search engine (or any user) accesses example.com. The 301 code says the non www domain has been “Moved Permanently” to the www domain. Before proceeding make sure the server has support for mod_rewrite.Continue Reading…

Tags: htaccess, redirect

How to use custom php.ini files on shared hosting

September 22, 2010 PHP Jesin A 9 Comments

php category thumbnail

The advantages of using php with apache web server are many. The wonderful file named .htaccess makes things easier by allowing the webmaster (thats you!) to play around with many settings which would otherwise need the php.ini to be edited. This is a boon for people having their websites hosted on a shared server. Such people can’t even dream of editing the php.ini file located on their web hosting provider’s server. Thus the concept of custom php.ini was born. Webmasters who have their website hosted on a server with support for custom php.ini can create a php.ini within their directory and provide all the necessary settings they require. But custom php.ini doesn’t work out-of-the-box. This article explains how to use custom php.ini on a shared hosting server.Continue Reading…

Tags: htaccess, php

Password Protect directories using .htpasswd

September 12, 2010 Web Servers Jesin A 2 Comments

htpasswd authname

Anything uploaded to the document root (www, htdocs, public_html folder) of your web server is visible to the public that is why its always recommended to store confidential information outside the document root. But if you want that information to be accessed by selected people then you need to put it in a directory inside the document root and password protect it. Even thought server side languages like PHP and ASP can be used to handle authentication it can be cumbersome. So the htaccess and htpasswd can be used to simplify the whole process and make your life easier. Lets go step-by-stepContinue Reading…

Tags: htaccess, htpasswd, password protection

  • 1
  • 2
  • Next Page »

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.