View previous topic :: View next topic |
Author |
Message |
Lawrence -
Joined: 16 Jan 2003 Posts: 207 Location: Brisbane, AU
|
Posted: Mon Oct 01, 2007 8:27 am Post subject: Guide: Using rewrites with Gallery2 |
|
|
I run Gallery2 on my server, and it's a nice piece of software. It has a strange rewrite system that doesn't translate well to Abyss.
Someone converted this weird system to one that works with lighttpd, and happily that rewrite is much more like the regular apache mod_rewrite rules that we need for Abyss.
You can find the lighttpd page here, but for convenience I've included a more Abyss-friendly list below.
The first line is the regexp, the second is the redirect-to path.
For every rule I turned off 'case sensitive', and the Next Action is always 'stop'. All other settings are left as default.
Code: | ^/(.*)/Rewrite.txt$
/$1/Works.txt
^/gallery2/v/(\?.+|\ .)?$
/gallery2/main.php?g2_view=core.ShowItem
^/gallery2/admin[/?]*(.*)$
/gallery2/main.php?g2_view=core.SiteAdmin&$1
^/gallery2/d/([0-9]+)-([0-9]+)/([^\/]+)(\?|\ )?(.*)$ =>
^/gallery/d/([0-9]+)-([0-9]+)/([^\/]+)(\?|\ )?(.*)$
/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=$1&g2_serialNumber=$2&$3
^/gallery/v/([^?]+)/slideshow.html
/gallery/main.php?g2_view=slideshow.Slideshow&g2_path=$1
^/gallery/v/([^?]+)(\?|\ )?(.*)$
/gallery/main.php?g2_view=core.ShowItem&g2_path=$1&$3
^/gallery/c/add/([0-9]+).html
/gallery/main.php?g2_view=comment.AddComment&g2_itemId=$1
^/gallery/c/view/([0-9]+).html
/gallery/main.php?g2_view=comment.ShowAllComments&g2_itemId=$1
^/gallery/p/(.+)
/gallery/main.php?g2_controller=permalinks.Redirect&g2_filename=$1
|
|
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1300
|
Posted: Tue Oct 02, 2007 12:37 am Post subject: Re: Guide: Using rewrites with Gallery2 |
|
|
Lawrence,
Thank you for taking the time to post and share that list of URL rewriting rules with our users' community. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
lond -
Joined: 25 Jan 2009 Posts: 2
|
Posted: Sun Jan 25, 2009 3:36 pm Post subject: |
|
|
Hi!
Can someone send me a screen dump or a cutout form the config file, so I can get the URL rewriting to work in Gallery2?
// Marcus |
|
Back to top |
|
|
lond -
Joined: 25 Jan 2009 Posts: 2
|
Posted: Sun Jan 25, 2009 7:50 pm Post subject: |
|
|
Hi!
When I did the URL_rewrite one by one I got it to work.
How should I setup the rules to get Gmap and WebDAV to work?
// Marcus |
|
Back to top |
|
|
|