Welcome! Log In Create A New Profile

Advanced

Re: i've been trying to convert this .htaccess for a week now

Luka Horvatic
December 29, 2009 09:06AM
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/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

i've been trying to convert this .htaccess for a week now

testbot December 28, 2009 09:28PM

Re: i've been trying to convert this .htaccess for a week now

Luka Horvatic December 29, 2009 09:06AM

RE: i've been trying to convert this .htaccess for a week now

testbot December 29, 2009 01:34PM

Re: RE: i've been trying to convert this .htaccess for a week now

Luka Horvatic December 29, 2009 03:34PM

Re: i've been trying to convert this .htaccess for a week now

merlin corey December 29, 2009 04:32PM

Re: i've been trying to convert this .htaccess for a week now

merlin corey December 29, 2009 04:32PM

RE: i've been trying to convert this .htaccess for a week now

testbot December 29, 2009 05:16PM

RE: i've been trying to convert this .htaccess for a week now

testbot December 29, 2009 05:16PM

RE: i've been trying to convert this .htaccess for a week now

testbot December 29, 2009 06:20PM

Re: i've been trying to convert this .htaccess for a week now

Steve December 29, 2009 08:58PM

RE: i've been trying to convert this .htaccess for a week now

testbot December 29, 2009 09:42PM

Re: RE: i've been trying to convert this .htaccess for a week now

Steve December 30, 2009 06:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready