You shouldn’t have to do anything particularly special to get this to work. The mod_rewrite directives in the /subfolder/.htaccess file will naturally override the directives in the parent .htaccess file (in the root).
However, the “problem” would seem to be the following line (in both files):
RewriteRule . /index.php [L]
You are rewriting to /index.php (that’s index.php in the document root) in both files. You need to remove the slash prefix on the substition:
RewriteRule . index.php [L]
You can do this in both files.
You already appear to set the RewriteBase correctly. By specifying a non-relative path in the substitution, you are overriding the value set in the RewriteBase directive.
Related Posts:
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- Apache Fallback instead of add_rewrite_rule
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- How to remove index.php from WordPress site URL
- Redirect old php link to wordpress link in .htaccess
- Redirect old php link to wordpress link in .htaccess
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- How to create custom 401, 403 and 500 error pages?
- cURL 28 error after switch from to brew php 7.2 on localhost
- PHP – redirect https to http and www to non-www
- How to run multiple Async HTTP requests in WordPress?
- WP CLI info showing correct PHP binary but wrong version of PHP
- Does the debug.log do log rotation?
- Bypass .htaccess when using download_url
- How can I run a .php file located in my site’s root folder?
- Fix 403 error on WordPress multisite network using subdomains
- WordPress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
- How to run multiple websites from single WordPress setup
- WordPress media upload “HTTP error”
- Using PHP in a Stylesheet (possibly a “.htaccess” problem?)
- WordPress-site can be reached on x.x.x.x/index.php – but not directly on the IP without index.php
- Block PHP Files Nginx
- Is it possible to move wordpress out of webroot?
- login wp impossible
- wp-admin/index.php gives a “500 Internal Server Error [closed]
- PHP Code stuck in Cache [Memcached] [closed]
- Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)
- Change the actual (or viewable) WordPress directory structure
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Evaluations of two wordpress security plans against php code injection attack
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- Cannot get media type from ‘x-mapp-php5’
- Restrict uploaded files into a custom folder to logged in users by htaccess: looking for Nginx – not only Apache – solution
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- Apache /Ubuntu server not running WordPress installation, outputting PHP code like HTML
- How to change home or site url using action hooks or filter?
- 3 blogs same installation, without WP MU
- How to combine wordpress_logged_in cookies in one cookie?
- Two Different Links for Same Product – WooCommerce [closed]
- WordPress: get recent posts, delete the current category
- Was told to change the .htacess file form .html to .php so this would work properly
- PHP Warning: chmod(): Operation not permitted in class-wp-filesystem-direct.php on line 173
- How to change redirection route to a php page for making it only accessible by logged-in members?
- WordPress admin dashboard missing icons
- subdirectory index.php is not working
- How to disable server signature on wordpress? [closed]
- custom url rewrite for wordpress
- WordPress & Fastcgi proper setup?
- Loading index.php contents which located outside blog folder for post single page
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- WP & Server Speed [Teacher Question]
- WordPress add_rewrite_rules for custom URLs ending in .html
- Call to undefined function mysql_connect() After upgrading PHP 7.1 to 7.3
- How does WP work in conjunction with a web server?
- Troll the hackers by redirecting them
- Seo Friendly Filter URLs
- How to allow download url redirection only if user logged in WordPress site?
- How to disable all logins except Network login in WordPress Multi site?
- Removing files programmatically
- Apache HTTP Server stops working for only a certain local website
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- How to debug failed changes to posts?
- Simple seo-friendly custom $_GET url rewrite with htaccess
- Migrating site, only header shows
- Infinite Loop in WordPress Installation
- WordPress on Ubuntu – “File not Found” for home.php – Trying to Redirect to Root Folder
- Why can’t I connect to the wordpress install page with Nginx?
- Rewrite rule not working, but only when parameter is text
- Internal Server Errors – Moving working multi-site install to my localhost
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- WordPress/NGINX not respecting the category URL for new posts
- Windows Setup: Error establishing a database connection
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- WAMP SERVER Command Prompt SET PATH=%PATH%
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- How to block access to a folder inside of wp-content for non logged in users?
- How to change query string with pretty URL in WordPress using .htaccess file
- Upload images from one server to an other in wordpress
- 403 Forbidden Localhost Wamp Apache Php
- Problem with ajax request and directory structure after site migration
- Strange special character/Latin characters
- How to solve 404 permalink errors on nginx server
- Redirect homepage /page/1/ to /blog/page/1/
- Not logged in when using http
- Admin-area broken through weird issues
- Blog only showing code
- Enabling XSendFile causes 404 for images on WordPress Multisite / Network
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- WordPress Memory limit not increasing
- how to put shortcode to the top of the page – theme 2014
- How to avoid timeout waiting for output from CGI script?
- How can I prevent wordpress from sending emails
- Increase Upload Size with htaccess | MAMP
- How can I improve and optimise my wordpress web server for better performance in 2023
- wp-login – unable to redirect user to a custom login url
- Updates applied to staging WordPress site affecting production even with different databases
- How to add global CSS to all webpages without installing any plugin?