logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Need help with URL Rewrite Gallery2 with ISPConfig
Author
DantePasquale



Joined: 03 Mar 2009
Posts: 1
Location: NE Ohio: Cleveland

PostPosted: Tue 03 Mar '09 16:56    Post subject: Need help with URL Rewrite Gallery2 with ISPConfig Reply with quote

Hi, I'm running Ubuntu the following:

Code:
Gallery version = 2.2.6 core 1.2.0.8
PHP version = 5.2.6-2ubuntu4.1 apache2handler
Webserver = Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g
Database = mysqli 5.0.67-0ubuntu6, lock.system=flock
Toolkits = Dcraw, Exif, Ffmpeg, Getid3, LinkItemToolkit, NetPBM, Thumbnail, Gd, ArchiveUpload, SquareThumb
Acceleration = none, none
Operating system = Linux inferno.cocoanet.us 2.6.27-12-generic #1 SMP Thu Feb 5 09:26:42 UTC 2009 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6) Gecko/2009020911 Ubu


And am having probs with rewriting the URLs to be able to use permalinks to the images. I've setup an .htaccess file for the "codebase" gallery at http://gallery.cocoanet.us that is generated by Gallery2 wizard and looks like this:

Code:
# BEGIN Url Rewrite section
# (Automatically generated.  Do not edit this section)
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_URI} !/main\.php$
    RewriteRule .   -   [L]

    RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
    RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
    RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://www.cocoanet.us/   [NC]
    RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://gallery.cocoanet.us/   [NC]
    RewriteCond %{HTTP:Referer} !^$
    RewriteRule .   /main.php?g2_view=watermark.DownloadItem&g2_itemId=%1   [L]
    RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/main\.php$
    RewriteRule .   /main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3   [QSA,L]
    RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/main\.php$
    RewriteRule .   /main.php?g2_path=%1   [QSA,L]
    RewriteCond %{THE_REQUEST} /f/([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/main\.php$
    RewriteRule .   /main.php?g2_controller=permalinks.Redirect&g2_filename=%1   [QSA,L]
</IfModule>

# END Url Rewrite section


All seems OK, but this is an empty gallery.

So, I setup an .htaccess in the multisite that has a real gallery http://www.cocoanet.us/gallery. Again, this is generated by Gallery wizard:
Code:

# BEGIN Url Rewrite section
# (Automatically generated.  Do not edit this section)
<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On

    RewriteBase /gallery/

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_URI} !/gallery/main\.php$
    RewriteRule .   -   [L]

    RewriteCond %{HTTP:Authorization} (.+)
    RewriteCond %{QUERY_STRING} !g2_authorization=
    RewriteRule .   %{REQUEST_URI}?g2_authorization=%1   [QSA]
    RewriteCond %{THE_REQUEST} /gallery/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/gallery/main\.php$
    RewriteRule .   /gallery/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3   [QSA,L]
    RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/gallery/main\.php$
    RewriteRule .   /gallery/main.php?g2_path=%1   [QSA,L]
</IfModule>


Now, I can't visit any pages in the multisite gallery! I get 404 errors for everything.

How can I go about debugging this? I really need the permalinks to work!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Thu 05 Mar '09 12:53    Post subject: Reply with quote

Mod rewrite forums are a good start point for questions like that

http://forum.modrewrite.com/ (english)
http://www.modrewrite.de/foren/index.php (german)
Back to top


Reply to topic   Topic: Need help with URL Rewrite Gallery2 with ISPConfig View previous topic :: View next topic
Post new topic   Forum Index -> Apache