I'm trying to rewrite requests for anything without a file extension to pass to a script.
For example:
example.com/admin.php will go to admin.php but http://www.example开发者_JAVA百科.com/param will be rewritten to http://example.com/test.php?do=param
I have it so that it will rewrite the param to ?do=param, but I can't figure out how to only do that if there is no '.' in the file name.
Try the if
directive from the rewrite module:
if ( $uri !~ \. ) { rewrite .....; }
精彩评论