Welcome! Log In Create A New Profile

Advanced

rewrite question - "(css/js).php" to "(.css/.js)"

October 23, 2010 04:43PM
Hi, I want to speed up my WordPress-Blog and so I want to cache "css.php", "js.php" files to ".css", ".js"

for example I want to rewrite ... this ->

http://suckup.de/wp-content/plugins/wp-special-textboxes/css/wp-special-textboxes.css.php?ver=3.0.1

to...

http://suckup.de/wp-content/cache/wp-special-textboxes.css

-----------------------

I had experiment with this rule...

[code]
## Optimierung - "(css/js).php" to "(css/js)"
location /wp-content/plugins/wp-special-textboxes/css/ {
if ($args ~ "ver=(.*)") {
rewrite ^/?(.*) $scheme://$host/wp-content/cache/wp-special-textboxes.css permanent;
}
}
location /wp-content/plugins/wp-special-textboxes/js/ {
if ($args ~ "ver=(.*)") {
rewrite ^/?(.*) $scheme://$host/wp-content/cache/wstb.js permanent;
}
}
[/code]

but this only rewrite

http://suckup.de/wp-content/plugins/wp-special-textboxes/css/?ver=3.0.1

to....

http://suckup.de/wp-content/cache/wp-special-textboxes.css?ver=3.0.1

-----------------------

Can someone please help me, thx! :-)


I have a second problem with the rewrite... I use varnish on port 80 and nginx on port 8080, but some files from my WordPress-Theme want to use something like this "@import "http://suckup.de:8080/blog/2010/07/26/webseiten-analyse/?mystique=css" ...
... can someone say me how to rewrite the port to 80, thx!?!? :-)


Mfg
Voku
Subject Author Posted

rewrite question - "(css/js).php" to "(.css/.js)"

voku October 23, 2010 04:43PM

Re: rewrite question - "(css/js).php" to "(.css/.js)"

Francis Daly October 24, 2010 07:34AM

Re: rewrite question - "(css/js).php" to "(.css/.js)"

voku October 24, 2010 11:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready