Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This website uses this feature where http://bonsaiframework.com will redirect to http://www.bonsaiframework.com

Enable Rewrite Module

With Ubuntu this is very easy,

...

Will result in showing a list of modules that you can enable. You want to enable rewrite. If it is not there than it might already be enabled.

Verify Rewrite Module

It is actually somewhat difficult to verify that the module is loaded.

Warning

Fill in ways here.

Apply Directives

Code Block
languagexml
# Enforce www in front of url.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.bonsaiframework\.com$ [NC]
RewriteRule (.*) http://www.bonsaiframework.com$1 [R,L]

I usually place these rules right after my ServerAlias lines in my virtual host.

Debugging

Warning

Talk about how to enable logging here.