Default Folder X 5 4 34

Topics

  • Multisite
  • General Examples

The .htaccess is a distributed configuration file, and is how Apache handles configuration changes on a per-directory basis.

Get a free, in-depth Default Folder X 5 tutorial in the SCO Showcase app for iPhone, iPad and Apple TV. In the SCO Showcase app, go to the 'ScreenCastsOnline Video Tutorials - Archive' section, then drag to the left to scroll. The Default Folder X video is the next-to-last one. Click to get it from the App Store. It is much easier to say the 'octal' sum of a file or directory has 755 permissions than to call out the permissions:-rwxr-xr-x The permission # is a three-digit octal number where the three digits correspond to the access rights of the user who owns the file, the group and other users.

WordPress uses this file to manipulate how Apache serves files from its root directory, and subdirectories thereof. Most notably, WP modifies this file to be able to handle pretty permalinks.

This page may be used to restore a corrupted .htaccess file (e.g. a misbehaving plugin).

Basic WP Basic WP

Multisite Multisite

WordPress 3.5 and up WordPress 3.5 and up

If you activated Multisite on WordPress 3.5 or later, use one of these.

Subfolder Example

SubDomain Example

WordPress 3.4 and below WordPress 3.4 and below

If you originally installed WordPress with 3.4 or older and activated Multisite then, you need to use one of these:

SubFolder Example

WordPress 3.0 through 3.4.2

SubDomain Example

General Examples General Examples

Options Options

Any options preceded by a + are added to the options currently in force, and any options preceded by a are removed from the options currently in force.

Possible values for the Options directive are any combination of:

None

All options are turned off.

All

All options except for MultiViews. This is the default setting.

ExecCGI

Execution of CGI scripts using mod_cgi is permitted.

FollowSymLinks

The server will follow symbolic links in this directory.

Includes

Server-side includes provided by mod_include are permitted.

IncludesNOEXEC

Server-side includes are permitted, but the #exec cmd and #exec cgi are disabled.

Default Folder X 5 4 34

Indexes

URL maps to a directory, and no DirectoryIndex, a formatted listing of the directory.

MultiViews

Content negotiated “MultiViews” are allowed using mod_negotiation.

SymLinksIfOwnerMatch

Only follow symbolic links where target is owned by the same user id as the link.

This will disable all options, and then only enable FollowSymLinks, which is necessary for mod_rewrite.

DirectoryIndex DirectoryIndex

DirectoryIndex sets the file that Apache will serve if a directory is requested.

Several URLs may be given, in which case the server will return the first one that it finds.

DefaultLanguage DefaultLanguage

DefaultLanguage will cause all files that do not already have a specific language tag associated with it will use this.

Default Charset Default Charset

Set the default character encoding sent in the HTTP header. See: Setting charset information in .htaccess

Default Folder X 5 4 34 7

Set Charset for Specific Files

Default folder x 5 4 345

Set for specific files

ServerSignature ServerSignature

The ServerSignature directive allows the configuration of a trailing footer line under server-generated documents. Optionally add a line containing the server version and virtual host name to server-generated pages (internal error documents, FTP directory listings, mod_status and mod_info output etc., but not CGI generated documents or custom error documents).

On

adds a line with the server version number and ServerName of the serving virtual host

Off

suppresses the footer line

Email

creates a “mailto:” reference to the ServerAdmin of the referenced document

Force Files to be Downloaded Force Files to be Downloaded

The below will cause any requests for files ending in the specified extensions to not be displayed in the browser but instead force a “Save As” dialog so the client can download.

HTTP Compression HTTP Compression

The AddOutputFilter directive maps the filename extension extension to the filters which will process responses from the server before they are sent to the client. This is in addition to any filters defined elsewhere, including SetOutputFilter and AddOutputFilterByType. This mapping is merged over any already in force, overriding any mappings that already exist for the same extension.

See also: https://developers.google.com/speed/docs/insights/EnableCompression

Force Compression for certain files

Send Custom HTTP Headers Send Custom HTTP Headers

The Header directive lets you send HTTP headers for every request, or just specific files. You can view a sites HTTP Headers using Firebug, Chrome Dev Tools, Wireshark or an online tool.

Unset HTTP Headers Unset HTTP Headers

Default Folder X 5 4 342

This will unset HTTP headers, using always will try extra hard to remove them.

Password Protect Login Password Protect Login

This is very useful for protecting the wp-login.php file. You can use this htpasswd generator.

Basic Authentication

Digest Authentication

Require Specific IP Require Specific IP

This is a way to only allow certain IP addresses to be allowed access.

Protect Sensitive Files Protect Sensitive Files

This denies all web access to your wp-config file, error_logs, php.ini, and htaccess/htpasswds.

Require SSL Require SSL

This will force SSL, and require the exact hostname or else it will redirect to the SSL version. Useful in a /wp-admin/.htaccess file.

External Resources External Resources

Default Folder X Mac

See also See also