Ok this probably has a superfluous few lines but this works for me:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^static/(.*)$ /wp-content/themes/MYTHEME/static/$1 [R=301,NC,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Related Posts:
- WordPress API Menu/Submenu Order
- Can a theme be built in React?
- WP REST API only returning partial list of users
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- Slow REST API calls on self-hosted WordPress [closed]
- How Do I Programmatically Force Custom Permalinks with My Theme?
- Google Maps not displaying in wordpress using Google Maps Javascript API
- Cache Busting using htaccess Rewrite rule?
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- How to write .htaccess dynamically? [closed]
- Obtain full v2 REST url?
- Why aren’t tags and categories added in post request to WP Rest API
- Allow REST API over HTTP, the rest of the site forced to HTTPS
- wp_remote_get times out on api request but jquery GET and postman work?
- Multisite theme path rewrite using .htaccess
- I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php
- Why WordPress AJAX returns undefined however it works fine when I add static url instead of dynamic function?
- how to use nimble-API and Display data?
- How to register dynamic settings in WordPress Customizer?
- “The REST API did not process the context query parameter correctly.” Custom theme conflicting with Media Library
- hide theme files for admin beneath root
- How to get custom logo with REST API instead of get_theme_mod();
- Can I set rest API endpoints from within a theme?
- Woocommerce REST API for my account & checkout process
- Different WP Rest API custom endpoints across different themes
- Extending the API I created to return category names
- Duplicate WordPress site to subdirectory but use same db?
- multi-language multi-site with REST API
- External api call using wordpress
- How can I enforce user to use Application password to generate JWT token? [closed]
- how to combine wordpress and front framework
- .htaccess for file .zip for update WordPress Theme self-host [closed]
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- Get the blog page URL set in Options
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- WP Rest API – How to get featured image
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- Worthwhile to restrict direct access of theme files?
- How Do I Protect My Premium WordPress App Theme from Copying?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- How to add posts to custom menus?
- WordPress Theme Preview Image
- How To extend WP_Customize_Control
- What is the difference between front-page.php and home.php? [duplicate]
- How can I get page slug
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- When to use _e and __ for the translation?
- What is a Theme textdomain?
- How to show a custom meta box on the “Quick Edit” screen?
- How to add CSS class to custom logo?
- WordPress Rest API custom endpoint optional param
- How to add custom css file in theme?
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- Display Search Result Count
- Using the Rewrite API to Construct a RESTful URL
- wp_nav_menu(), how to change class?
- theme path in javascript file
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- Making update notification functionality for my themes
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- How do I remove a pre-existing customizer setting?
- Minimum Template Files for Theme Development
- What’s the difference between home.php and index.php?
- pass object/JSON to wp_localize_script
- get_template_part vs action hooks in themes
- Theme Activate Hook
- Solutions for generating dynamic javascript / CSS
- wp_redirect() – headers already sent
- Can I create my own “Recent Posts” widget or customize the existing one?
- Custom single template for a specific category
- how can I add an icon/image for a child theme?
- How can I add a URL field to the attachments window?
- The the_post_thumbnail without srcset?
- The proper way to include/require PHP files in WordPress
- Get the first image from post content (eg.: hotlinked images)
- after_setup_theme always runs
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Getting failure when using filemtime() with wp_enqueue_style
- Do I actually need to link my theme’s style.css in the theme files
- Why is wp_head() creating a top margin at the top of my theme header?
- How to store widget fields data as an array?
- How do I add version control to my workflow?
- Using classes instead of global functions in functions.php
- How can I display a menu on certain pages only?
- Enqueue a stylesheet for login page and make it appear in head element
- Adding a div to wrap widget content after the widget title
- How to insert a logo in the header?
- How to set permalink structure via functions.php
- What is $post_id? is it a global variable in WordPress?