1

This does not work

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^/index\.php$ - [L]
RewriteRule ^/css/(.*) /wp-content/themes/themename/css/$1 [QSA,L]
RewriteRule ^/js/(.*) /wp-content/themes/themename/js/$1 [QSA,L]
RewriteRule ^/img/(.*) /wp-content/themes/themename/img/$1 [QSA,L]
RewriteRule ^/font/(.*) /wp-content/themes/themename/font/$1 [QSA,L]
RewriteRule ^/plugins/(.*) /wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
0

Strip the preceeding forward slashes from your rules:

Example (incorrect)

RewriteRule ^/css/(.*) /wp-content/themes/themename/css/$1 [QSA,L]

Example (correct)

RewriteRule ^css/(.*) wp-content/themes/themename/css/$1 [QSA,L]

All rules (correct)

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^/index\.php$ - [L]
RewriteRule ^css/(.*) wp-content/themes/themename/css/$1 [QSA,L]
RewriteRule ^js/(.*) wp-content/themes/themename/js/$1 [QSA,L]
RewriteRule ^img/(.*) wp-content/themes/themename/img/$1 [QSA,L]
RewriteRule ^font/(.*) wp-content/themes/themename/font/$1 [QSA,L]
RewriteRule ^plugins/(.*) wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.