{"id":3040,"date":"2014-09-15T19:11:00","date_gmt":"2014-09-15T19:11:00","guid":{"rendered":"http:\/\/www.deuzebranaweb.com.br\/?p=3040"},"modified":"2014-09-15T19:11:00","modified_gmt":"2014-09-15T19:11:00","slug":"wordpress-htaccess","status":"publish","type":"post","link":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/2014\/09\/15\/wordpress-htaccess\/","title":{"rendered":"wordpress htaccess"},"content":{"rendered":"<div id=\"headline\">\n<div class=\"wrapper\">\n<h2>Codex<\/h2>\n<div id=\"p-personal\" class=\"portlet\">\n<p class=\"login\">Codex tools: <a href=\"http:\/\/codex.wordpress.org\/index.php?title=Special:UserLogin&amp;returnto=htaccess\">Log in<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"pagebody\">\n<div class=\"wrapper\">\n<div id=\"bodyContent\" class=\"col-10\">\n<h2 class=\"pagetitle\">htaccess<\/h2>\n<p>The .htaccess is a distributed configuration file, and is how Apache handles configuration changes on a per-directory basis.<\/p>\n<p>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.<\/p>\n<p>This page may be used to restore a corrupted .htaccess file (e.g. a misbehaving plugin).<\/p>\n<table id=\"toc\" class=\"toc\" summary=\"Contents\">\n<tbody>\n<tr>\n<td>\n<div id=\"toctitle\">\n<h2>Contents<\/h2>\n<p><span class=\"toctoggle\">[<a id=\"togglelink\" class=\"internal\"><\/a>hide]<\/span><\/p>\n<\/div>\n<ul>\n<li class=\"toclevel-1\"><a href=\"http:\/\/codex.wordpress.org\/htaccess#Basic_WP\"><span class=\"tocnumber\">1<\/span> <span class=\"toctext\">Basic WP<\/span><\/a><\/li>\n<li class=\"toclevel-1\"><a href=\"http:\/\/codex.wordpress.org\/htaccess#Multisite\"><span class=\"tocnumber\">2<\/span> <span class=\"toctext\">Multisite<\/span><\/a>\n<ul>\n<li class=\"toclevel-2\"><a href=\"http:\/\/codex.wordpress.org\/htaccess#WordPress_3.5_and_up\"><span class=\"tocnumber\">2.1<\/span> <span class=\"toctext\">WordPress 3.5 and up<\/span><\/a><\/li>\n<li class=\"toclevel-2\"><a href=\"http:\/\/codex.wordpress.org\/htaccess#WordPress_3.4_and_below\"><span class=\"tocnumber\">2.2<\/span> <span class=\"toctext\">WordPress 3.4 and below<\/span><\/a><\/li>\n<li class=\"toclevel-2\"><a href=\"http:\/\/codex.wordpress.org\/htaccess#WordPress_MU\"><span class=\"tocnumber\">2.3<\/span> <span class=\"toctext\">WordPress MU<\/span><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a id=\"Basic_WP\" name=\"Basic_WP\"><\/a><\/p>\n<h2><span class=\"mw-headline\">Basic WP<\/span><\/h2>\n<pre># BEGIN WordPress\n&lt;IfModule mod_rewrite.c&gt;\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\nRewriteCond\u00a0%{REQUEST_FILENAME}\u00a0!-f\nRewriteCond\u00a0%{REQUEST_FILENAME}\u00a0!-d\nRewriteRule . \/index.php [L]\n&lt;\/IfModule&gt;\n# END WordPress\n<\/pre>\n<p><a id=\"Multisite\" name=\"Multisite\"><\/a><\/p>\n<h2><span class=\"mw-headline\">Multisite<\/span><\/h2>\n<p><a id=\"WordPress_3.5_and_up\" name=\"WordPress_3.5_and_up\"><\/a><\/p>\n<h3><span class=\"mw-headline\">WordPress 3.5 and up<\/span><\/h3>\n<p>If you activated Multisite on WordPress 3.5 or later, use one of these.<\/p>\n<p><b>Subfolder Example<\/b><\/p>\n<pre>RewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\n\n# add a trailing slash to \/wp-admin\nRewriteRule ^([_0-9a-zA-Z-]+\/)?wp-admin$ $1wp-admin\/ [R=301,L]\n\nRewriteCond\u00a0%{REQUEST_FILENAME} -f [OR]\nRewriteCond\u00a0%{REQUEST_FILENAME} -d\nRewriteRule ^ - [L]\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(.*\\.php)$ $2 [L]\nRewriteRule . index.php [L]\n<\/pre>\n<p><strong>SubDomain Example<\/strong><\/p>\n<pre>RewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\n\n# add a trailing slash to \/wp-admin\nRewriteRule ^wp-admin$ wp-admin\/ [R=301,L]\n\nRewriteCond\u00a0%{REQUEST_FILENAME} -f [OR]\nRewriteCond\u00a0%{REQUEST_FILENAME} -d\nRewriteRule ^ - [L]\nRewriteRule ^(wp-(content|admin|includes).*) $1 [L]\nRewriteRule ^(.*\\.php)$ $1 [L]\nRewriteRule . index.php [L]\n<\/pre>\n<p><a id=\"WordPress_3.4_and_below\" name=\"WordPress_3.4_and_below\"><\/a><\/p>\n<h3><span class=\"mw-headline\">WordPress 3.4 and below <\/span><\/h3>\n<p>If you originally installed WordPress with 3.4 or older and activated Multisite then, you need to use one of these:<\/p>\n<p><strong>SubFolder Example<\/strong><\/p>\n<p>WordPress 3.0 through 3.4.2<\/p>\n<pre># BEGIN WordPress\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\n\n# uploaded files\nRewriteRule ^([_0-9a-zA-Z-]+\/)?files\/(.+) wp-includes\/ms-files.php?file=$2 [L]\n\n# add a trailing slash to \/wp-admin\nRewriteRule ^([_0-9a-zA-Z-]+\/)?wp-admin$ $1wp-admin\/ [R=301,L]\n\nRewriteCond\u00a0%{REQUEST_FILENAME} -f [OR]\nRewriteCond\u00a0%{REQUEST_FILENAME} -d\nRewriteRule ^ - [L]\nRewriteRule  ^[_0-9a-zA-Z-]+\/(wp-(content|admin|includes).*) $1 [L]\nRewriteRule  ^[_0-9a-zA-Z-]+\/(.*\\.php)$ $1 [L]\nRewriteRule . index.php [L]\n# END WordPress\n<\/pre>\n<p><strong>SubDomain Example<\/strong><\/p>\n<pre># BEGIN WordPress\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\n\n# uploaded files\nRewriteRule ^files\/(.+) wp-includes\/ms-files.php?file=$1 [L]\n\nRewriteCond\u00a0%{REQUEST_FILENAME} -f [OR]\nRewriteCond\u00a0%{REQUEST_FILENAME} -d\nRewriteRule ^ - [L]\nRewriteRule . index.php [L]\n# END WordPress\n<\/pre>\n<p><a id=\"WordPress_MU\" name=\"WordPress_MU\"><\/a><\/p>\n<h3><span class=\"mw-headline\">WordPress MU <\/span><\/h3>\n<p>If you started using WordPress with WordPress MU (WPMU) and then migrated to a newer version of WordPress multisite, the .htaccess rules are more complex:<\/p>\n<p><strong>SubFolder Example<\/strong><\/p>\n<pre>RewriteEngine On\nRewriteBase \/\n\n# BEGIN WordPress\n#uploaded files\nRewriteRule ^(.*\/)?files\/$ index.php [L]\nRewriteCond\u00a0%{REQUEST_URI}\u00a0!.*wp-content\/plugins.*\nRewriteRule ^(.*\/)?files\/(.*) wp-includes\/ms-files.php?file=$2 [L]\n\n# add a trailing slash to \/wp-admin\nRewriteCond\u00a0%{REQUEST_URI} ^.*\/wp-admin$\nRewriteRule ^(.+)$ $1\/ [R=301,L]\n\nRewriteCond\u00a0%{REQUEST_FILENAME} -f [OR]\nRewriteCond\u00a0%{REQUEST_FILENAME} -d\nRewriteRule . - [L]\nRewriteRule  ^([_0-9a-zA-Z-]+\/)?(wp-.*) $2 [L]\nRewriteRule  ^([_0-9a-zA-Z-]+\/)?(.*\\.php)$ $2 [L]\nRewriteRule . index.php [L]\n# END WordPress\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>http:\/\/codex.wordpress.org\/htaccess<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Codex Codex tools: Log in htaccess The .htaccess is a distributed configuration file, and is how Apache handles configuration changes on a per-directory basis. WordPress uses this file to manipulate how Apache serves files from its root directory, and subdirectories thereof. Most notably, WP modifies&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_angie_page":false,"page_builder":"","footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-3040","post","type-post","status-publish","format-standard","hentry","category-apache2","category-wordpress"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=3040"}],"version-history":[{"count":0,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3040\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=3040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=3040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=3040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}