1

I'm trying to map this dynamic query:

 /wp-admin/admin-ajax.php?action=mymail_form_css 

to this static file:

 /wp-admin/mymail_form.css 

What I've tried so far which doesn't seem to work is this htaccess code in /wp-admin/.htaccess

RewriteEngine on RewriteCond %{QUERY_STRING} action=mymail_form_css RewriteRule ^(.*)$ /mymail_form.css [L,R=301] 

I've also tried placing that in the site's document root and no go.

I'm doing this for performance reasons. The dynamic query takes an excessive amount of time to generate a small bit of CSS which hardly ever changes.

1 Answer 1

1

Never mind. I figured it out. Got it to work by moving the css file to public_html (not really necessary), changing the htaccess code to

RewriteEngine on RewriteCond %{QUERY_STRING} action=mymail_form_css RewriteRule ^(.*)$ /mymail_form.css? [L,R=301] 

and moving the code to the document root's .htaccess

Carry on~

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.