Welcome! Log In Create A New Profile

Advanced

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

merlin corey
December 29, 2009 04:32PM
On Mon, Dec 28, 2009 at 6:24 PM, AMP Admin <admin@ampprod.com> wrote:
> I hate to ask but this one is just too big and complicated for me to
> convert.  Any help would be good.  Thanks!

You really tried for a week? I don't see any nginx configuration
here, just a dump of an apache configuration.

>
> RewriteRule ^articles/{0,1}$   articles.php [QSA,L]
>
> RewriteRule ^articles/entry/([^/.]+)/{0,1}$
> articles.php?action=viewarticle&articleUri=$1 [QSA,L]
>
> RewriteRule ^articles/entry/{0,1}$
> articles.php?action=viewarticle&articleUri=$1 [QSA,L]
>
> RewriteRule ^articles/category/([^/.]+)/{0,1}$
> articles.php?action=viewcategory&articleCatUri=$1 [QSA,L]
>
>
>
> RewriteRule ^news/{0,1}$  news.php [QSA,L]
>
> RewriteRule ^news/([^/.]+)/{0,1}$  news.php?newsUri=$1 [QSA,L]
>
>
>
> RewriteRule ^blogs/{0,1}$   blogs.php [QSA,L]
>
> RewriteRule ^blogs/all/([0-9]+)/([0-9]+)/{0,1}$
> blogs.php?page=$2&per_page=$1  [QSA,L]
>
> RewriteRule ^blogs/top/{0,1}$   blogs.php?action=top_blogs [QSA,L]
>
> RewriteRule ^blogs/top/([0-9]+)/([0-9]+)/{0,1}$
> blogs.php?action=top_blogs&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^blogs/top_posts/{0,1}$   blogs.php?action=top_posts [QSA,L]
>
> RewriteRule ^blogs/tag/([^/.]+)/{0,1}$
> blogs.php?action=search_by_tag&tagKey=$1 [QSA,L]
>
> RewriteRule ^blogs/tag/{0,1}$   blogs.php?action=search_by_tag&tagKey=
> [QSA,L]
>
> RewriteRule ^blogs/posts/([^/.]+)/tag/([^/.]+)/{0,1}$
> blogs.php?action=search_by_tag&tagKey=$2&ownerName=$1 [QSA,L]
>
> RewriteRule ^blogs/posts/([^/.]+)/category/([^/.]+)/{0,1}$
> blogs.php?action=show_member_blog&ownerName=$1&categoryUri=$2 [QSA,L]
>
> RewriteRule ^blogs/entry/([^/.]+)/{0,1}$
> blogs.php?action=show_member_post&postUri=$1 [QSA,L]
>
> RewriteRule ^blogs/entry/{0,1}$
> blogs.php?action=show_member_post&postUri= [QSA,L]
>
> RewriteRule ^blogs/posts/([^/.]+)/{0,1}$
> blogs.php?action=show_member_blog&ownerName=$1 [QSA,L]
>
> RewriteRule ^blogs/posts/{0,1}$
> blogs.php?action=show_member_blog&ownerName= [QSA,L]
>
> RewriteRule ^blogs/posts/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$
> blogs.php?action=show_member_blog&ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule
> ^blogs/posts/([^/.]+)/category/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$
> blogs.php?action=show_member_blog&ownerName=$1&categoryUri=$2&page=$4&per_page=$3
> [QSA,L]
>
>
>
> RewriteRule ^events/{0,1}$  events.php?show_events=all&action=show [QSA,L]
>
> RewriteRule ^events/all/([0-9]+)/([0-9]+)/{0,1}$
> events.php?show_events=all&action=show&page=$2&per_page=$1  [QSA,L]
>
> RewriteRule ^events/part/{0,1}$  events.php?show_events=all&action=show
> [QSA,L]
>
> RewriteRule ^events/search/{0,1}$  events.php?action=search [QSA,L]
>
> RewriteRule ^events/search/([^/.]+)/{0,1}$
> events.php?action=search_by_tag&tagKey=$1 [QSA,L]
>
> RewriteRule ^events/my/{0,1}$  events.php?action=show&show_events=my [QSA,L]
>
> RewriteRule ^events/new/{0,1}$  events.php?action=new [QSA,L]
>
> RewriteRule ^events/entry/([^/.]+)/{0,1}$
> events.php?action=show_info&eventUri=$1 [QSA,L]
>
> RewriteRule ^events/part/([^/.]+)/{0,1}$
> events.php?action=show_part&eventUri=$1 [QSA,L]
>
>
>
> RewriteRule ^ads/{0,1}$  classifieds.php?Browse=1 [QSA,L]
>
> RewriteRule ^ads/search/{0,1}$  classifieds.php?SearchForm=1 [QSA,L]
>
> RewriteRule ^ads/my/{0,1}$  classifiedsmy.php?MyAds=1 [QSA,L]
>
> RewriteRule ^ads/new/{0,1}$  classifiedsmy.php?PostAd=1 [QSA,L]
>
> RewriteRule ^ads/cat/([^/.]+)/{0,1}$  classifieds.php?catUri=$1 [QSA,L]
>
> RewriteRule ^ads/all/cat/([0-9]+)/([0-9]+)/([^/.]+)/{0,1}$
> classifieds.php?catUri=$3&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^ads/subcat/([^/.]+)/{0,1}$  classifieds.php?scatUri=$1 [QSA,L]
>
> RewriteRule ^ads/all/subcat/([0-9]+)/([0-9]+)/([^/.]+)/{0,1}$
> classifieds.php?scatUri=$3&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^ads/entry/([^/.]+)/{0,1}$  classifieds.php?entryUri=$1 [QSA,L]
>
> RewriteRule ^ads/tag/([^/.]+)/{0,1}$  classifieds_tags.php?tag=$1 [QSA,L]
>
>
>
> RewriteRule ^photo/all/([0-9]+)/([0-9]+)/{0,1}$
> browsePhoto.php?page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^photo/gallery_top/{0,1}$  browsePhoto.php?rate=top [QSA,L]
>
> RewriteRule ^photo/gallery_top/([0-9]+)/([0-9]+)/{0,1}$
> browsePhoto.php?rate=top&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^photo/gallery_top/([0-9]+)/([0-9]+)/{0,1}$
> browsePhoto.php?rate=top&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^photo/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$
> browsePhoto.php?tag=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^photo/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/$
> browsePhoto.php?tag=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^photo/gallery_tag/([^/.]+)/{0,1}$  browsePhoto.php?tag=$1
> [QSA,L]
>
> RewriteRule ^photo/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)$
> browsePhoto.php?ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^photo/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)/$
> browsePhoto.php?ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^photo/gallery/all/([^/.]+)/{0,1}$  browsePhoto.php?ownerName=$1
> [QSA,L]
>
> RewriteRule ^photo/gallery/([^/.]+)/{0,1}$  viewPhoto.php?fileUri=$1 [QSA,L]
>
> RewriteRule ^photo/gallery/{0,1}$  viewPhoto.php?fileUri=$1 [QSA,L]
>
>
>
> RewriteRule ^music/all/([0-9]+)/([0-9]+)/{0,1}$
> browseMusic.php?page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^music/gallery_top/{0,1}$  browseMusic.php?rate=top [QSA,L]
>
> RewriteRule ^music/gallery_top/([0-9]+)/([0-9]+)/{0,1}$
> browseMusic.php?rate=top&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^music/gallery_top/([0-9]+)/([0-9]+)/{0,1}$
> browseMusic.php?rate=top&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^music/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$
> browseMusic.php?tag=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^music/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/$
> browseMusic.php?tag=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^music/gallery_tag/([^/.]+)/{0,1}$  browseMusic.php?tag=$1
> [QSA,L]
>
> RewriteRule ^music/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)$
> browseMusic.php?ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^music/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)/$
> browseMusic.php?ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^music/gallery/all/([^/.]+)/{0,1}$  browseMusic.php?ownerName=$1
> [QSA,L]
>
> RewriteRule ^music/gallery/([^/.]+)/{0,1}$  viewMusic.php?fileUri=$1 [QSA,L]
>
> RewriteRule ^music/gallery/{0,1}$  viewMusic.php?fileUri=$1 [QSA,L]
>
>
>
> RewriteRule ^video/all/([0-9]+)/([0-9]+)/{0,1}$
> browseVideo.php?page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^video/gallery_top/{0,1}$  browseVideo.php?rate=top [QSA,L]
>
> RewriteRule ^video/gallery_top/([0-9]+)/([0-9]+)/{0,1}$
> browseVideo.php?rate=top&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^video/gallery_top/([0-9]+)/([0-9]+)/{0,1}$
> browseVideo.php?rate=top&page=$2&per_page=$1 [QSA,L]
>
> RewriteRule ^video/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/{0,1}$
> browseVideo.php?tag=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^video/gallery_tag/([^/.]+)/([0-9]+)/([0-9]+)/$
> browseVideo.php?tag=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^video/gallery_tag/([^/.]+)/{0,1}$  browseVideo.php?tag=$1
> [QSA,L]
>
> RewriteRule ^video/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)$
> browseVideo.php?ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^video/gallery/all/([^/.]+)/([0-9]+)/([0-9]+)/$
> browseVideo.php?ownerName=$1&page=$3&per_page=$2 [QSA,L]
>
> RewriteRule ^video/gallery/all/([^/.]+)/{0,1}$  browseVideo.php?ownerName=$1
> [QSA,L]
>
> RewriteRule ^video/gallery/([^/.]+)/{0,1}$  viewVideo.php?fileUri=$1 [QSA,L]
>
> RewriteRule ^video/gallery/{0,1}$  viewVideo.php?fileUri=$1 [QSA,L]
>
>
>
> RewriteRule ^groups/all/{0,1}$ grp.php [QSA,L]
>
> RewriteRule ^groups/entry/([^/.]+)/{0,1}$
> grp.php?action=group&groupUri=$1      [QSA,L]
>
> RewriteRule ^groups/category/([^/.]+)/{0,1}$
> grp.php?action=categ&categUri=$1        [QSA,L]
>
> RewriteRule ^groups/keyword/([^/.]+)/{0,1}$
> grp.php?action=categ&keyword=$1       [QSA,L]
>
>
>
> RewriteRule ^search/tag/([^/.]+)/{0,1}$  search.php?Tags=$1 [QSA,L]
>

I would probably do these with regular expression locations with
captures and then either pass directly to fastcgi what I want or
proceed with rewrite.

> RewriteCond %{REQUEST_FILENAME} -f [OR]
>
> RewriteCond %{REQUEST_FILENAME} -d

This part of course with try_files in root location.

>
> RewriteRule .+ - [L]
>

Not really sure what this one is checking...

>
> RewriteRule ^([A-Za-z0-9_-]+)$ profile.php?ID=$1 [QSA,L]
>

Regular expression location with captures again.

-- Merlin

_______________________________________________
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: 123
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