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

voku nginx-forum at nginx.us
Sun Oct 24 19:59:08 MSD 2010


Hi, thx for the help... :-) .... this is what I made ->    

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

and a second thx for the tip with the "SERVER_PORT" :-) ... I found this
in the theme ...

[code]
$pageURL .=
$_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$request;
[/code]

und changed it to ... 

[code]
$pageURL .= $_SERVER["SERVER_NAME"].":80".$request;
[/code]

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,143927,144072#msg-144072




More information about the nginx mailing list