Access denied after activating rewrite

Pinguin

Joined: 2005-09-27
Posts: 193
Posted: Sun, 2009-09-13 09:08

It happend 2 times, that 1 could not access anything with a fresh installation, after I activated the rewrite module. It is on a VPS and I have root permissions.

# 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 %{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]
</IfModule>

# END Url Rewrite section
ll .htaccess
-rw-rw-rw- 1 root root 781 2009-09-10 22:07 .htaccess
 
Pinguin

Joined: 2005-09-27
Posts: 193
Posted: Mon, 2009-09-14 16:27

Can anyone help me please? I get crazy with this. I did new installs again and again and it is always the same. My first change after the installation is the activation of rewrite. After setting .htaccess to 666. Gallery says everything is ok. It says rewrite is activated on the top and then I cannot acces anything.

Access forbidden!
 You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. 
 If you think this is a server error, please contact the webmaster. 
Error 403

I have a working gallery on the same system. I tried to exchange the .htaccess-file, replacing the domain-name and I could access again the top-page, but no other page. Afterward I tried to save the rewrite-configuration with menu I can't access anything.

Gallery URL = http://gallery.tld/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.9 apache2handler
Webserver = Apache/2.2.10 (Linux/SUSE)
Database = mysqli 5.0.67, lock.system=flock
Toolkits = ArchiveUpload, Exif, LinkItemToolkit, Gd
Acceleration = none, none
Operating system = Linux vps 2.6.26-2-openvz-amd64 #1 SMP Fri Aug 14 08:15:13 UTC 2009 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.13) Gecko/2009080200 SUSE/3.0.13-0.1.2 Firefox/3.0.13
Rows in GalleryAccessMap table = 7
Rows in GalleryAccessSubscriberMap table = 26
Rows in GalleryUser table = 2
Rows in GalleryItem table = 26
Rows in GalleryAlbumItem table = 5
Rows in GalleryCacheMap table = 0
 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-09-14 19:42

This has to be a server config issue, because it just works on shared hosts. Heck it just works on my Debian server where I've just installed MySQL, Apache, PHP, etc via apt-get and everything just works :)

Are you sure your server is configured to support rewriting?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here