Welcome!
Log In
Create A New Profile
Home
>
Nginx Related Forums
>
How to...
> Topic
Advanced
Rewrite if directory doesn't exist
Posted by
tfe
Forum List
Message List
New Topic
tfe
Rewrite if directory doesn't exist
May 02, 2012 06:09AM
Registered: 1 year ago
Posts: 7
I use this rule for rewriting if directory doesn't exist:
if (!-d $request_filename ) {
rewrite ^/([^/.]+)$ /profile.php?nick=$1 last;
}
The tutorial says that "if" is bad. Is there any way how to change this rule so tyhat it works without "if"?
Thanks.
Reply
Quote
tfe
Re: Rewrite if directory doesn't exist
May 06, 2012 10:06AM
Registered: 1 year ago
Posts: 7
Noone can answer this question?
Please, I need it urgently. The new server is ready and I have to disconnect the old server.
I need to know if "if" may cause some problems in this rewrite rule.
Reply
Quote
Newer Topic
Older Topic
Print View
RSS
Sorry, only registered users may post in this forum.
Click here to login
Online Users
Vipper
Guests: 90
Record Number of Users: 5 on May 17, 2013
Record Number of Guests: 138 on May 16, 2013