My use:
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# BEGIN WordPress
# As diretrizes (linhas) entre "BEGIN WordPress" e "END WordPress" são
# geradas dinamicamente e só devem ser modificadas através de filtros do WordPress.
# Quaisquer alterações nas diretivas entre esses marcadores serão sobrescritas.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Related Posts:
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- Move WordPress to subdirectory, keep ALL URLs
- WordPress permalinks Yahoo hosting(no .htaccess allowed)
- How do I turn off 301 redirecting posts (not canonical)?
- Passing variables through permalink structure
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Remove subfolders from URL
- Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]
- htaccess or redirect to cloak portion of a link?
- custom naming of search permalink /search/
- Rewriting search permalink
- removing index.php IIS 7.5 webconfig
- Rewrite rule never matching
- wordpress permalinks tweeks
- Redirect user if it’s not logged in
- Custom url for a single page
- Using WP rather than .htaccess to redirect pages/posts
- .htaccess – Redirect duplicated post ended in ‘-number/’ to the same url without the -number/
- What happens when permalink settings are updated?
- Change of permalink structure – redirects in htaccess breaks the archive links
- How can I make my .htaccess file writeable by wp-admin?
- 404 with post name permalinks
- Problems redirecting to “pretty” permalinks (wordpress in Subdirectory)
- .htaccess file missing from WordPress install directory
- Why does chrome keep downloading a file instead of running the site?
- Permalinks not working
- Changes to .htaccess not updating the file (old rules still take effect)
- If I change permalink structures, can I use htaccess to permanantly redirect links?
- Redirect parent taxonomy to it’s child
- WordPress 404 in development area
- Need Help Correct Regular Expression Redirect Code
- Custom Permalink
- Change in permalink structure made javascript cookie not work correctly
- Permalinks not working with Vagrant
- How to redirect to correct pages after permalink structure change
- Page preview is shown, updating page gives 404 error
- How to change old permalink?
- Redirect Uploads Folder to Query Vars in WordPress
- Redirect a Blogger Page URL to wordpress
- flush_rewrite_rules breaks permalinks
- WordPress 4.4 old permalink redirect
- Htaccess https 301 problem
- Accessing Subdirectories in WordPress Install
- Empty permalinks settings in .htaccess
- How to rewrite a URL to another rewritten URL without changing the address?
- An other permalink problem – 404 Error
- WordPress Not Using Template Files After Permalink Update
- How to use different domains for different blogs hosted in the same host in subdomains with .htaccess
- WordPress 3.1 .htaccess contents keep dissappearing?
- Custom permalinks in WordPress
- How to prevent WP overwriting my custom htaccess rewrites?
- mod-rewrite exception? keep #hash in matching urls?
- What causes /pages/ to appear in URI, and how to remove it?
- .htaccess rewriterule being ignored – tyring to remove dates from WP posts
- Changing WordPress routing to load the same page for different URLs
- Permalink for specific page name
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Comment author url link is wrong? How to change from authors/ to author/
- How to redirect RSS feeds to Feedburner and keep pretty permalinks?
- WordPress not generating .htaccess but tells me that (Permalink structure updated.)
- change WordPress permalinks and redirect new urls 301
- Ignore postname in permalink
- Permalinks – .htaccess
- Custom permalink structure with %postname% in front of domain name
- Configuring Home Page Address
- WordPress Page Not Found if Permalink Settings is Postname
- Conditional Permalink based on category?
- Problems with permalinks (.htaccess not working)
- old permalinks not found
- What would cause a 500 Server Error with permalinks turned OFF?
- mod-rewrite rules grabs “broken permalinks”, too
- Change author permalink using htaccess?
- Cannot publish posts or pages when I change permalink structure
- wordpress admin panel loop on nginx
- Very strange behaviour related to htaccess and custom posts and custom posts substrings (BUG?)
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- WordPress All pages but home simply read “hello”
- Issue with my links or permalinks
- WordPress pages break with custom permalink settings (theme directory not output)
- How to rewrite a folder in WordPress?
- LetsEncrypt WordPress on the Raspberry Pi – Nice url’s give 404 with https, http works
- On IIS, stop WordPress from resaving my web.config file when I enter the Permalinks config page
- Can’t access WordPress site in subfolder possibly because of .htaccess redirect from root installation?
- Pretty permalinks (again)
- Fresh wordpress installation in sub-directory not accessible
- Folder Name and Category Name WordPress
- customize urls displayed by previous_post_link and next_post_link
- Removed and Reinstalled WordPress, Redirect Broken now
- .htaccess not working in WordPress
- Problem when i configure permalink
- redirect old pages by .htaccess
- custom permlink .htaccess file 404 Not Found error
- Why are all pages redirecting to homepage when using custom permalinks?
- Files placed in directory with wordpress 404
- 404 not found error on WordPress local host
- .htaccess regex for redirect subdomain to root domain & redirect old permalinks
- Add segment to URL in htaccess
- htaccess strip url
- 301 Redirect posts to newly added categories
- How to use ‘blogs.dir’ as media upload instead of ‘uploads’ directory in WordPress multisite setup