.htaccess Online Generator

Create a custom .htaccess easily

Default Index Page and Order

Default Index Load Order What should load first (ie- index.html index.php index.htm default.htm home.htm)

Options

Allow Execution of CGI scripts?   Yes

CGI File Extensions

.cgi
.pl
Do you want to allow execution of CGI scripts anywhere below this .htaccess file?

If so, which extensions should be allowed?
Include Files (SSI) or without #exec
File Extension(s)
Do you want to allow server-side includes (mod_include)?
Follow Symbolic Links  Yes Allow the following of symbolic links in this directory by the server such as for scripts.
Follow Symbolic Links if Owner Matches  Yes The server will only follow the symbolic link if the target file or directory is owned by the same user as the link
Directory Index  Yes Show the directory index if no page or file is specified and there is no default index in that directory? (mod_autoindex)
Force Secure Connections (SSL)  Yes
SSL Domain
Redirect all non-HTTPS request to HTTPS for security

Authentication

Deny by default  Yes
Require valid username  Yes
All if user OR ip matches  Yes
Secure Area Name
User Authentication  Yes
Path to users file (.htpasswd)
Group Authentication  Yes
Path to groups file (.htgroup)
Allowed Users (CSV)
Allowed Groups (CSV)
Allowed IP addresses (wildcards and names allowed)
Blocked IP addresses (wildcards and names allowed)

Protect System Files

Protect .htaccess and user and group files  Yes
Additional files to protect

File Cache Control

Specify File Cache TimeHow often will the client/proxy refresh the file
Modification BasedExpire all clients/proxies at the same time
Cache Time

ModRewrite


Block E-mail Harvesters   Yes
Send them to what page?
Block access to your site from common e-mail and spam harvesters
Time-Dependant Page  Yes
Page Name :
Daytime Starts :
Daytime Ends :
Day Page :
Night Page :
Change what pages are displayed based on time of day (24-hour format)
Redirect Failing URLs To Other Webserver  Yes
Secondary Server:
When a URL is invalid, or would produce an error, redirect to a secondary server.

Rewrite Condition

Rewrite Page

Page Name :
Page requested in the URL
Browser Dependant Page
Netscape Page Page to use for Netscape
IE Page Page to use for IE
Page for Lynx Page to use for text mode
Default Page Page to use for other browsers

Map Folder To Script

This trick will make it possible to run a script that has parameters in the URL. You can make a custom home page script for your users that they can access like /login/home.html or /login/preferences.html and have them both go to login.php.
Folder NameFolder you will reference in your href and urls (ie login)
Script NameScript that will be ran (ie login.php, login.cgi, or login.pl) If you would like the rest of the path as a POST variable, do something like "login.php?page="

Custom Error Documents

Allows you to specify custom documents to serve on error conditions
Error 400 Bad Request
Error 401 Authentication Required
Error 403 Forbidden
Error 404 Not Found
Error 500 Server Error
Permanent Redirection
If you moved a page to a new location, use this to redirect the user to the new location.
Redirect Moved Document  Yes
Moved Document Filename
New Location

Need a home to test all this fun stuff out and build your site? Get Free PHP Hosting by Byteact!