This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
Breaks Gallery2 installation (issues with mod_rewrite?) #63
Closed
Description
What steps will reproduce the problem?
1. Install Gallery 2 with /gallery2 as base path (http://gallery.menalto.com/).
2. Set up Gallery 2's mod_redirect options (search engine friendly URLs for
viewing images, ...)
3. Access Gallery 2 while mod_pagespeed is enabled.
What is the expected output? What do you see instead?
CSS and Javascript fails to load. CSS URLs point to stuff like '
/gallery2/cc.dd96a8e3391b4c1fed53b9f21dc98dac.modules,_core,_[...]' and give a
'Forbidden' error when accessed, JS URLs point to
'/gallery2/jm.323fc81c51191367c455f73008420775.main,ophp?g2_view=core,oCom[...]'
which returns a page like this:
-----------------------
Apache server with mod_pagespeed
OK
NOT
FOUNDhttp://hostname/gallery2/jm.323fc81c51191367c455f73008420775.main,ophp[...]
-----------------------
What version of the product are you using (please check X-Mod-Pagespeed
header)?
0.9.0.0-128
On what operating system?
Debian Linux (testing)
Which version of Apache?
2.2.16-3
Which MPM?
Prefork
Additional info:
Gallery2's generated .htaccess with rewrite rules:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /gallery2/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . - [L]
RewriteCond %{QUERY_STRING} view=core.DownloadItem
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://sitename.com/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery2/main.php [F,L]
RewriteCond %{THE_REQUEST} /gallery2/v/slideshow/fullscreen/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/v/slideshow/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/tag/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=tags.VirtualAlbum&g2_tagName=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/f/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_path=%1 [QSA,L]
</IfModule>
Original issue reported on code.google.com by lev.ar...@gmail.com
on 9 Nov 2010 at 10:35