Welcome! Log In Create A New Profile

Advanced

CSS problem after nginx rewrite for clean URLs

Sujay Mahajan
October 21, 2009 10:46AM
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/.
Subject Author Posted

CSS problem after nginx rewrite for clean URLs

Sujay Mahajan October 21, 2009 10:46AM

Re: CSS problem after nginx rewrite for clean URLs

Nick Pearson October 21, 2009 11:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready