CSS problem after nginx rewrite for clean URLs

Sujay Mahajan lists at ruby-forum.com
Wed Oct 21 18:39:08 MSD 2009


I am writing rewrite rules in nginx for clean URLs.

Following is the rule:

location / {
    if (!-e $request_filename) {
        rewrite ^/post\/(.*)\/(.*)\/(.*)$ /post.php?a=$1&b=$2&c=$3 last;
    }
}

Everytime I hit mydomain.com/post/123/456/abc-def it renders
mydomain.com/post.php?a=123&b=456&c=abc-def

Now the regex is right and php is rendered properly. But it is screwing
up my css.
The nav bar is garbled and images are not seen.
What could be the problem?
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list