leungeric.com

Digg del.icio.us Technorati StumbleUpon Twitter

Force www. in your URL using .htaccess

.htaccess | Tutorials & Resources

1 Star2 Stars3 Stars4 Stars5 Stars (1 out of 5)
Loading ... Loading ...

Just add the following code to your .htaccess file in the highest folder of your web directory and yor visitors will be forced to use the www version.

RewriteEngine on

RewriteCond %{HTTP_HOST} !^www.your_domain.com$

RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]

.htaccess Cheat Sheet

.htaccess | Tutorials & Resources

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

.htaccess (Hypertext Access) is the default name of Apache’s directory-level configuration file. It provides the ability to customize configuration directives defined in the main configuration file. The configuration directives need to be in .htaccess context and the user needs appropriate permissions.

(Read more)

WordPress Image Upload HTTP Error Fix

.htaccess | Tutorials & Resources | WordPress

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

If your WordPress 2.5 installation shows an HTTP Error when uploading files using the media uploader, this is due to mod_security on the async-upload.php file which handles file uploads.

Just add a few lines to WordPress’ .htaccess file should fix that problem.

(Read more)

1

Sponsors