i've been trying to convert this .htaccess for a week now
Luka Horvatic
lists at ruby-forum.com
Tue Dec 29 16:58:57 MSK 2009
Try this one:
rewrite ^/articles/{0,1}$ /;
rewrite ^/articles/entry/([^/.]+)/{0,1}$ /;
rewrite ^/articles/entry/{0,1}$ /;
rewrite ^/articles/category/([^/.]+)/{0,1}$ /;
setenv ;
rewrite ^/news/{0,1}$ /;
setenv $;
rewrite ^/news/([^/.]+)/{0,1}$ /;
rewrite ^/blogs/{0,1}$ /;
rewrite ^/blogs/all/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/blogs/top/{0,1}$ /;
rewrite ^/blogs/top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/blogs/top_posts/{0,1}$ /;
rewrite ^/blogs/tag/([^/.]+)/{0,1}$ /;
rewrite ^/blogs/tag/{0,1}$ /;
rewrite ^/blogs/posts/([^/.]+)/tag/([^/.]+)/{0,1}$ /;
rewrite ^/blogs/posts/([^/.]+)/category/([^/.]+)/{0,1}$ /;
rewrite ^/blogs/entry/([^/.]+)/{0,1}$ /;
rewrite ^/blogs/entry/{0,1}$ /;
rewrite ^/blogs/posts/([^/.]+)/{0,1}$ /;
rewrite ^/blogs/posts/{0,1}$ /;
rewrite ^/blogs/posts/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite / /;
rewrite ^/events/{0,1}$ /;
rewrite ^/events/all/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/events/part/{0,1}$ /;
rewrite ^/events/search/{0,1}$ /;
rewrite ^/events/search/([^/.]+)/{0,1}$ /;
rewrite ^/events/my/{0,1}$ /;
rewrite ^/events/new/{0,1}$ /;
rewrite ^/events/entry/([^/.]+)/{0,1}$ /;
rewrite ^/events/part/([^/.]+)/{0,1}$ /;
rewrite ^/ads/{0,1}$ / last;
rewrite ^/ads/search/{0,1}$ / last;
rewrite ^/ads/my/{0,1}$ / last;
rewrite ^/ads/new/{0,1}$ / last;
rewrite ^/ads/cat/([^/.]+)/{0,1}$ / last;
rewrite ^/ads/all/cat/([0-9]+)/([0-9]+)/([^/.]+)/{0,1}$ /;
rewrite ^/ads/subcat/([^/.]+)/{0,1}$ / last;
rewrite ^/ads/all/subcat/([0-9]+)/([0-9]+)/([^/.]+)/{0,1}$ /;
rewrite ^/ads/entry/([^/.]+)/{0,1}$ / last;
rewrite ^/ads/tag/([^/.]+)/{0,1}$ / last;
rewrite ^/photo/all/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/photo/gallery_top/{0,1}$ / redirect;
break;
rewrite ^/photo/gallery_top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/photo/gallery_top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/photo/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/photo/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/$ /;
rewrite ^/photo/gallery_tag/([^/.]+)/{0,1}$ / redirect;
break;
rewrite ^/photo/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)$ /;
rewrite ^/photo/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)/$ /;
rewrite ^/photo/gallery/all/([^/.]+)/{0,1}$ /;
rewrite ^/photo/gallery/([^/.]+)/{0,1}$ /;
rewrite ^/photo/gallery/{0,1}$ /;
rewrite ^/music/all/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/music/gallery_top/{0,1}$ / redirect;
break;
rewrite ^/music/gallery_top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/music/gallery_top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/music/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/music/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/$ /;
rewrite ^/music/gallery_tag/([^/.]+)/{0,1}$ / redirect;
break;
rewrite ^/music/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)$ /;
rewrite ^/music/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)/$ /;
rewrite ^/music/gallery/all/([^/.]+)/{0,1}$ /;
rewrite ^/music/gallery/([^/.]+)/{0,1}$ /;
rewrite ^/music/gallery/{0,1}$ /;
rewrite ^/video/all/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/video/gallery_top/{0,1}$ / redirect;
break;
rewrite ^/video/gallery_top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/video/gallery_top/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/video/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$ /;
rewrite ^/video/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/$ /;
rewrite ^/video/gallery_tag/([^/.]+)/{0,1}$ / redirect;
break;
rewrite ^/video/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)$ /;
rewrite ^/video/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)/$ /;
rewrite ^/video/gallery/all/([^/.]+)/{0,1}$ /;
rewrite ^/video/gallery/([^/.]+)/{0,1}$ /;
rewrite ^/video/gallery/{0,1}$ /;
rewrite ^/groups/all/{0,1}$ /grp.php last;
rewrite ^/groups/entry/([^/.]+)/{0,1}$ /;
rewrite ^/groups/category/([^/.]+)/{0,1}$ /;
rewrite ^/groups/keyword/([^/.]+)/{0,1}$ /;
setenv $;
rewrite ^/search/tag/([^/.]+)/{0,1}$ /;
if (-f $request_filename){
set $rule_81 1;
}
if (-d $request_filename){
set $rule_81 1;
}
if ($rule_81 = "1"){
#ignored: "-" thing used or unknown variable in regex/rew
}
rewrite ^/([A-Za-z0-9_-]+)$ /profile.php?ID=$1 last;
--
Posted via http://www.ruby-forum.com/.
More information about the nginx
mailing list