[URL Rewrite] [solved] path configuration

petterviken
petterviken's picture

Joined: 2007-04-25
Posts: 9
Posted: Sat, 2007-08-18 07:34

URL Rewrite Administration:

Under 'Show Item' I'm using the default: 'v/%path%'. Is there any reason i can't use just '%path%'?

My path is like this now:
http://petter.vikens.net/photos/v/2007/up_north/

And i find it more natural to skip the 'v', like this:
http://petter.vikens.net/photos/2007/up_north/

Test the Rewrite Parser Configuration:
Apache mod_rewrite: Success
Gallery .htaccess file: Success

-- Specs --
Gallery version = 2.2.2 core 1.2.0.4
PHP version = 5.2.2 cgi-fcgi
Webserver = Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Database = mysql 5.0.24a-standard-log, lock.system=flock
Operating system = Linux 2.6.18.1

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2007-08-20 21:25

The default has 'v/' because it can't have any conflicts. You can remove the 'v/', just be aware that you can't make any top level items/albums that have filenames matching real dirs/files in the gallery2 directory. (ie, don't make an album with pathname = "lib" or "themes"). There's a task in Site Admin / Maintenance you can run to check for conflicts.. remove the v/, then go run that task to see if you're (currently) ok.

 
petterviken
petterviken's picture

Joined: 2007-04-25
Posts: 9
Posted: Tue, 2007-08-21 03:04

Yes of course! I see now... this is perfect. i always use the current year as the top level album. so that won't be any problem. tnx a lot.

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Thu, 2008-01-10 17:36

This was timely. Thanks for asking and solving the question:) I do have one question though...

I want to remove the "v" because I am trying to upgrade to Gallery2 and keep my old URLs from Gallery1 and will have to rename each photo to match the old URLS. This means I will have to remove the "v". Now, what if I do create an album that is the same name as a top level item? Will I get a warning before it overwrites the previous item?

Thanks for any clarification.