Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Hoping someone here can help me out with this. 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.

If it matters, 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. Any help or pointers is appreciated.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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~

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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