SOLVED - Thumbnails not displayed if www. included in address

scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 10:05

I have set up a photos section on my website using Gallery2. All appears to be working well except when I navigate to a page by typing the address in the address bar. If I include the www. prefix, thumbnails and pictures do not show. If I omit the www. everything works fine. Any suggestions as to what is causing this or how to avoid it?

Gallery version (not just "2"):2.2.4
PHP version (e.g. 5.1.6):5.2.5
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):Apache 2.2.8
Database (e.g. MySql 5.0.32):MySQL version 5.0.45-community
Activated toolkits (e.g. NetPbm, GD):Image magick, GD, NetPbm
Operating system (e.g. Linux):Linux
Browser (e.g. Firefox 2.0):Firefox 2.0.0.13

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 13:58

i've seen this www vs non-www issue now a dozen times in the forums in the last month and it's bothering me.

how did you install gallery 2? with fantastico or another one-click / single step installer?
the normal way is to install gallery 2 by copying it on your webserver and then going through our 12 step installer (i guess it's 12 steps).

you can fix by going to "site admin -> plugins" and ensuring that the "url rewrite" module is installed and active. then go to "site admin -> url rewrite" and deactivate the "hotlink" rule or add the two versions of your address (with and without www) in the "setup" tab of url rewrite.

please let us know how you've intalled gallery 2 such that we can take the proper measures to ensure that this issue gets resolved rather sooner than later for many other users.
thanks.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade,

Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 14:12

Thanks for reply. I had a quick look in the forums but did not see the similar posts.

Install was performed with Fantastico.

Will try your suggestion and post back.

Thanks,

Scotty

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 17:06

url rewrite was installed (version 1.1.13.3). In Setup tab I added the second variation of the site address then in the Rules tab I deselected Block Hotlinked Items and then both changes. Still no joy.

I think my next move will be to try following your 12 step guide ([/i]I need to reinstall anyway as [i]I have installed Gallery in the wrong place).

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 17:12

please post the contents of your .htaccess file which is located in your gallery folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 18:44

I edited the .htaccess file to add the three lines suggested in the security "how to" -
<Files ~ "\.(inc|class)$">
Deny from all
</Files>

Everything following these lines is what was in the file originally. What now appears as the first half of the file is a result of adding the www. prefix to the site name.

Contents of .htaccess file:

# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
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 %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://www.dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php?g2_view=rewrite.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://www.dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php?g2_view=watermark.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{THE_REQUEST} /gallery/sitemap(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/updates(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.UpdatesAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/popular(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.PopularAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/admin/(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=core.SiteAdmin [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/random(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.RandomAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)/slideshowapplet\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L]
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/([^?]+)/slideshow\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/c/add/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)\.davmount(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=webdav.DownloadDavMount&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/rating/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rating.RatingAlbum&g2_limit=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/w(/[^?]*)?(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_controller=webdav.WebDav&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/f/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rewrite.FileNotFound [QSA,L]
</IfModule>

# END Url Rewrite section

<Files ~ "\.(inc|class)$">
Deny from all
</Files>
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
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 %{QUERY_STRING} view=core.DownloadItem
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php [F,L]
RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php?g2_view=rewrite.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php?g2_view=watermark.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{THE_REQUEST} /gallery/sitemap(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/updates(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.UpdatesAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/popular(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.PopularAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/admin/(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=core.SiteAdmin [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/random(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.RandomAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)/slideshowapplet\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L]
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/([^?]+)/slideshow\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/c/add/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)\.davmount(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=webdav.DownloadDavMount&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/rating/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rating.RatingAlbum&g2_limit=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/w(/[^?]*)?(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_controller=webdav.WebDav&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/f/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rewrite.FileNotFound [QSA,L]
</IfModule>
# END Url Rewrite section

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 18:51

so your .htaccess has 2 gallery url rewrite sections?

# BEGIN Url Rewrite section
....
# END Url Rewrite section

# BEGIN Url Rewrite section
....
# END Url Rewrite section

please delete your .htaccess file and have gallery write a new one.
the second section shouldn't be there and the 2nd section is also where the hotlink protection is still enabled and accepting the non-www hostname only.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 19:07

.htaccess deleted & a new one was created automatically. Now I cannot access the www. site at all. Firefox reports error:
Firefox can't find the server at www.dagen.me.uk. Not even the non-Gallery part of the site is there.

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 19:16

Just checked from another computer and www. address is working (but thumbnails not showing). Will try powering down and trying again.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 19:16

does it work if you uninstall the URL rewrite module?
note, please verify that the .htaccess file is empty once the g2 url rewrite module has been uninstalled.

if it works with the "URL rewrite" module removed, let's install the module again.
it should work fine as long as the hotlink protection rule is inactive. if you want to use that rule, make sure your list of approved referers is fine.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 19:20

Went into site maintenance and deleted cache - now seeing www. site but no thumbnails.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 19:24

maybe you've missed my last message, see above.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 19:26

Uninstalled url rewrite plugin and cleared cache - same symptoms, thubnails only visible on non www. url.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 19:32

is the .htaccess now empty?

please post a URL to your website such that we can verify this issue.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 19:59

Does not work if I uninstall rewrite module. .htaccess is not empty after uninstall.

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 20:01

url is dagen.me.uk or www.dagen.me.uk

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 20:11

> .htaccess is not empty after uninstall.

that's the problem. that's still an artifact from your fantastico installation. please empty your .htaccess file or delete the file.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 20:20

Deleted .htaccess and it is automatically created again with the same content.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 20:22

what's the content of the .htaccess file now?

note: gallery is not writing .htaccess unless you're activating the url rewrite module. only at the very moment you activate the rewrite module it writes the file. if it's written at another time, it's not gallery. so you're dealing with other software interfering here.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 20:27

I need to access a page on the site for .htaccess to appear again. Contents:

#{gallerySection}
<Files ~ "\.(inc|class)$">
Deny from all
</Files>
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
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 %{QUERY_STRING} view=core.DownloadItem
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php [F,L]
RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php?g2_view=rewrite.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /gallery/main.php?g2_view=watermark.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{THE_REQUEST} /gallery/sitemap(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/updates(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.UpdatesAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/popular(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.PopularAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/admin/(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=core.SiteAdmin [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/random(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=dynamicalbum.RandomAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)/slideshowapplet\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L]
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/([^?]+)/slideshow\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/c/add/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)\.davmount(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=webdav.DownloadDavMount&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/rating/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rating.RatingAlbum&g2_limit=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/w(/[^?]*)?(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_controller=webdav.WebDav&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/f/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /gallery/main.php?g2_view=rewrite.FileNotFound [QSA,L]
</IfModule>
# END Url Rewrite section

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32324
Posted: Sun, 2008-03-30 20:35

this .htaccess is clearly the root of your problem. it got the

> RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://dagen.me.uk/ [NC]

rules in it.

what i can't explain is why the .htaccess file should be repopulated by any g2 request. g2 doesn't do that and i don't think fantastico has modified g2 to do that.

a possibility is that your ftp program is confusing you. maybe it doesn't really delete the .htaccess file when you ask it to delete. please refresh the ftp view to see if it's really changed / gone when you ask it to do so.

is the url rewrite module uninstalled right now? if not, please do so.
to prevent anything from writing to the .htaccess file, you can change the .htaccess file's permissions to 000 such that noone can edit it anymore. to edit it yourself, you'll need to change the permissions to 777 (writeable for everyone) again.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
scotty2

Joined: 2008-03-30
Posts: 17
Posted: Sun, 2008-03-30 23:27

Possibly solved.

It looks like the problem was a conflict with a previous Fantastico installation of Joomla. When I removed Joomla both with & without www. started working correctly.

.htaccess now reads:

DirectoryIndex .htaccess
SetHandler Gallery_Security_Do_Not_Remove
Options None
<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
Order allow,deny
Deny from all

Many thanks for the valiant efforts to help this new convert to Gallery2. I have learnt a lot today, including what a wonderful forum this is.

Scotty2

Login or register to post comments