Skip to main content
deleted 102 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

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.

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.

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.

edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 267
Source Link
SelfTaught
  • 825
  • 1
  • 8
  • 12

Htaccess - Map dynamic URL query to a static file

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.