Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a tool to create htaccess files

branch: gh-pages

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 compass
Octocat-spinner-32 css
Octocat-spinner-32 images
Octocat-spinner-32 js
Octocat-spinner-32 .gitignore
Octocat-spinner-32 favicon.ico
Octocat-spinner-32 favicon.png
Octocat-spinner-32 index.html
Octocat-spinner-32 readme.md
readme.md

How to contribute

  1. Fork this repo.
  2. Add a <label> with <input>-element to the index.html-file.
  3. Add your .htaccess-rules to js/functions.js.
  4. Send me a pull request.

Editing the index.html file

This step is fairly simple, just add a checkbox to the list of checkboxes and give it a unique ID and a little description:

<label>
    <input type="checkbox" checked="checked" id="hotlinking" /> Prevent hotlinking
</label>

Editing the js/functions.js file

This step is also simple, just add your case to the switch. The name of the case is the id of the checkbox of your item. You can also make use of the url-variable if your .htaccess-rule needs to know this:

case 'redirectwww' :
{
    // Redirect non-www to www:
    if(url != '')
    {
    return "# REDIRECT NON-WWW to WWW" + "\n" +
        "RewriteCond %{HTTP_HOST} ^" + url.replace('www.', '').replace('.', '\\.') + "\n" +
        "RewriteRule (.*) http://" + url + "/$1 [R=301,L]";
    } else {
        return "# REDIRECT NON-WWW to WWW" + "\n" +
            "# DISABLED: NO URL ENTERED";
    }
}

That's it!

Simple and easy huh?

Something went wrong with that request. Please try again.