Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

RewriteRule sample for WordPress in subdirectory

In the case you installed another instance of Wordpress in a subdirectory of main WordPress site in Azure Web App for Windows, your WordPress installation may be like this,   if use "Post name" Permalink setting, with default web.config, articles in subdirectory might give 404 (not found), for example,   For this problem, you can modify web.config to exclude subdirectory "blogs" from main site rewrite rules, here is sample web.config,

If the WordPress sites are hosted on Apache on Azure web app for containers, modify wwwroot/.htaccess, for example,

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

# Include in the next line all folders to exclude
RewriteCond %{REQUEST_URI} !(blogs) [NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Share the post

RewriteRule sample for WordPress in subdirectory

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×