Provides configurable short URLs using mod_rewrite, ISAPI_Rewrite or PathInfo.
The configuration page will show you parsing methods available depending on server type (Apache or IIS). If you are unsure of which method to choose you should select either mod_rewrite (Apache) or ISAPI_Rewrite (IIS). The module will test to see if you server supports the parsing method chosen. If all test pass you will be redirected to the Admin Module page and you may now activate the module.
The headings shown on the configuration page are links that activate that specific method. If you want to change the method that you have selected at a later date you will have to uninstall the plugin, install and configure by selecting the method you want to change to.
Currently there are no known issues for this module.
Go to the Gallery phpinfo page and look for Loaded Modules. You should see mod_rewrite in the list if it's loaded. Note that the list will be empty if you run PHP in cgi mode.
gallery2/lib/support/index.php?phpinfo
If you are the server admin make sure the Gallery directory has the proper AllowOverride rights. Gallery needs to be able to override FileInfo and Options. Put this at the end of your Apache configuration:
<Directory /full/path/to/gallery2> AllowOverride FileInfo Options </Directory>
See also the Gallery2 FAQ on this topic. Put this in your .htaccess, then go to Site Admin -> URL Rewrite and save the rules to restore your orginal .htaccess.
# BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On # The path to your Gallery (in this case example.com/gallery2/) RewriteBase /gallery2/ RewriteRule ^admin /gallery2/main.php?g2_view=core.SiteAdmin [QSA,L] </IfModule> # END Url Rewrite section
When making any changes to the URL Rewrite configuration (including the rules) you need to access the URL Rewrite admin interface through the embedding application.
Please make sure the Apache user have write access to the .htaccess file in the directory of which the embedding application resides.
touch /var/www/localhost/embedApp/.htaccess chmod 666 /var/www/localhost/embedApp/.htaccess
If you are not comfortable with leaving everyone with write access to the .htaccess file you may change it back after you have completed the setup and don't plan to change any settings (including the rules under the Setup tab).
chmod 644 /var/www/localhost/embedApp/.htaccess
Validate
No need to configure embedded mode. You don't need to be in embedded mode when making any changes to the rules since Gallery will parse the rules.