![]() |
|
.htaccess help required to change URL - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: .htaccess help required to change URL (/thread-4525.html) |
.htaccess help required to change URL - lauravink - 2009-01-25 The problem is as following: I have the domain http://www.lauravink.in. For my photos to show I want to use (ofcourse) Zenphoto. I don't want to upload a new ZenPhoto CMS to every folder, but just ones, in the folder /gallery, so I could manage my pictures (and layout) from one place (and also saves webspace). But if I use ZenPhoto in the galleryfolder (or root), than the URL of a album would be something like: http://www.lauravink.in/gallery/index.php?album=poland, instead of the http://www.lauravink.in/poland/ as I would like it to be. I know it is possible to rewrite the URL with the .htaccess, but I think it's so difficult! Could someone please help me? I thought of something like: RewriteRule ^index.php?album\=(.*)$ /$1/ [R] in the .htaccess folder, but this doesn't work.. Thank you very much. Laura Vink .htaccess help required to change URL - acrylian - 2009-01-25 htaccess is a tricky thing.. I fear I can't help with that currently. The easiest would be to install Zenphoto in the root. I see you use also Pixelpost, since that is in a subfolder it might be possible to do that depending on how the index page is named and created. .htaccess help required to change URL - lauravink - 2009-01-25 Installing Zenphoto in the root is ofcourse also an option if it makes it easier. lauravink.in / index.php?album=paris to lauravink.in / paris. But still.. how? I won't be using Pixelpost, I do use this in my .nl domain, but I won't in my .in domain (where this topic is about). I hope some else can help me with it! .htaccess help required to change URL - acrylian - 2009-01-25 Ok, I of coures don't know how your site is setup in detail but for the blog you use Pixelpost. Anyway, I would say just install Zenphoto in the root, that is the easiest solution. The you will get exactly what you need. Zenphoto runs absolutly fine in the root. .htaccess help required to change URL - lauravink - 2009-01-25 I've installed Zenphoto in the root and have made an new .htaccess. My .htaccess looks like this RewriteEngine On RewriteRule ^index.php?album\=(.*)$ $1 [R] Any ideas anyone? .htaccess help required to change URL - lauravink - 2009-01-25 I just found out that I do need to edit the .htacces that comes with the setup. Now my .htaccess looks like this: htaccess file version 1.2.2.0;Update the above and the define in setup.php when you make changes to the rewrite rules!NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory. (Or let setup.php do it for you!)RewriteEngine On !!! Change this to the web path (eg: http://www.yourwebsite.com/photos --> /photos) !!!RewriteBase / RewriteRule ^admin/?$ zp-core/admin.php [R,L] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule index.php$ index.php [L,QSA] Rewrite rule addition for searchRewriteRule ^page/search/fields([0-9]+)/(.)/([0-9]+)/?$ index.php?p=search&searchfields=$1&words=$2&page=$3 [L,QSA] Rewrite additions for zenpage
RewriteRule ^pages/(.)/?$ index.php?p=pages&title=$1 [L,QSA] RewriteRule ^(.)/image/(thumb|[0-9]{1,4})/([^/\]+)$ zp-core/i.php?a=$1&i=$3&s=$2 [L,QSA] Catch-all - everything else gets handled in PHP for compatibility.RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA] RewriteRule ^index.php?album\=(.*)$ $1 [R] But still not working as I would like to. Should I put it somewhere else in the file? .htaccess help required to change URL - acrylian - 2009-01-26 Assuming that you at least use the latest official 1.2.2 version you should not need to change anything manually in the .htaccess file. Setup should do that for you. Just use the htaccess file that is included in the download package and run setup (which should run automatically though). .htaccess help required to change URL - lauravink - 2009-01-26 Ooooohhhh.. it works! But I just have to link to the URL lauravink.in/poland and it shows the wright page. Anyway, thanks for your help acrylian! .htaccess help required to change URL - acrylian - 2009-01-26 [i]I thought I would go to the URL lauravink.in/index.php?album=poland and it would change to lauravink.in/poland.[/i] .htaccess help required to change URL - mungler - 2009-01-27 hi lauravink. just an idea - if you want zenphoto in the root, but not of www.lauravink.com, how about creating a subdomain? thats what i did with my site - www.mungler.com is the main site (nothing on there yet) and gallery.mungler.com is the zenphoto subdomain. works a treat .htaccess help required to change URL - darkS - 2009-04-16 [i]Just a note for anyone that might missed it like me.[/i] |