# 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} !/$
RewriteRule . - [L]
RewriteCond %{THE_REQUEST} /sitemap(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshow\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /c/add/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_path=%1 [QSA,L]
</IfModule>
# END Url Rewrite section
# 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} !/$
RewriteRule . - [L]
RewriteCond %{THE_REQUEST} /sitemap(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshow\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /c/add/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /?g2_path=%1 [QSA,L]
</IfModule>
# END Url Rewrite section
Posts: 16504
I don't know everything you want to do since it looks like you want to do about 15 different things.
To remove main.php from the URL, do this.
Edit config.php, near the bottom is a line that specifies baseUri. Edit that to just be: www.example.com instead of www.example.com/main.php
Then in .htaccess, at the top add this:
# Set the default handler.
DirectoryIndex main.php
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
Thanks, I tried this. Results:
.htaccess (top)
all links ends with error 500
Withount this setting works:
http://foto.pocitac.com
http://foto.pocitac.com/
http://foto.pocitac.com/v/Japonsko
but
http://foto.pocitac.com/v/Japonsko/
does NOT works. All links add "/" at the end. If anybody click on one album, then he will get 404 error.
I just wan one thing. To have mod_rewrite on (to obtain nice urls) without \main.php
(base album will then look like http://foto.pocitac.com/ and not http://foto.pocitac.com/main.php)
Btw, tutorial (about rename main.php in FAQ) dont mention about reactivatin rewrite module. But its possible, right?
.htaccess not looks like this:
config.php
Posts: 4
Fixed.
Manual .htaccess edit to "force index.php"
Thanks
//SOLVED