.htaccess viewer
Drop a .htaccess file to see each directive explained, its rewrite rules and redirects, and anything Apache would read differently than you meant. Your browser opens it on your device: nothing is uploaded.
What you see
| .htaccess in the viewer | What it does |
|---|---|
| Directives explained | Rewrite, Redirect, ErrorDocument, Options, Header, Require and more, with Apache’s defaults |
| Checked | Sections never closed or closed in the wrong order, a # comment after a directive, Options Indexes |
| Name | Opened by its name, with no extension |
| Extensions | .conf, .cnf, .ovpn |
| Upload | None: opened on your device |
What is a .htaccess file?
A .htaccess file holds Apache settings for one folder of a website: redirects, rewrite rules, error pages, who may see what. Apache reads it on every request; the dot at the start hides it on Mac and Linux.
How to open a .htaccess file
- Add your .htaccess. Drop the file in the box, choose it or paste it.
- Look at it. The file colored, with what each directive means and a link to Apache’s docs under it when you switch Explanations on, and mistakes such as a section never closed or a # after a directive, which Apache doesn’t read as a comment.
Questions
How do I open a .htaccess file?
Drop it here, or open it in a text editor. On a Mac or Linux it is hidden because its name starts with a dot: show hidden files (Cmd + Shift + . on a Mac) to pick it.
Why is my .htaccess ignored?
Apache only reads it where AllowOverride lets it, set in the server’s own config; AllowOverride None, the default, ignores it.
Can I put a comment after a directive?
No. Apache comments go on a line of their own starting with #; after a directive the # is read as part of the value.
Is my file uploaded?
No. The viewer runs in your browser and opens the file on your device. Nothing is sent anywhere.
Can opening a file here damage it?
No. The viewer only reads the file: a browser gives a page no way to change it. If something goes wrong, the view stops and the file is as it was.