ZenphotoCMS Forum
htaccess rewrite url question - 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 rewrite url question (/thread-725.html)



htaccess rewrite url question - roraz - 2006-08-08

I have a few urls set up like this within zenphoto eg

http://www.mydomain.com/zen/index.php?p=credit
http://www.mydomain.com/zen/index.php?p=about

does anybody know what to put in the htaccess file so that it'll make the urls like:

http://www.mydomain.com/zen/credit/
http://www.mydomain.com/zen/faq/

I tried looking through the forums search, but I couldn't find anything relevant though I think I may have been phrasing my search requests right. any help would be greatly appreciated!!?




htaccess rewrite url question - Rygaard - 2006-08-09

You could try the following:

`

Options +FollowSymlinks

RewriteEngine on

RewriteRule ^zen/(.+)/ index.php?p=$1 [nc]

`

Maybe you need to delete the first line - I use it depending on how my server is setup.

Code above was inspired by: http://corz.org/serv/tricks/htaccess2.php




htaccess rewrite url question - trisweb - 2006-08-10

I actually have a rule for that in the latest SVN code --

RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]

Add it to your .htaccess and they'll be accessible through /page/credit and /page/about respectively.




htaccess rewrite url question - EdnaGarrett - 2006-08-13

thanks!




htaccess rewrite url question - biffta - 2006-08-22

I am confused by Zenphoto's modrewrite facilities. Is the install/admin section supposed to create the htaccess files for us or do we have to do it all for ourself?




htaccess rewrite url question - trisweb - 2006-08-23

You have to edit the one included in the package. If you can't find it, you're probably on a mac/linux system, and it's hidden. It's in the download, you just have to find it

Also, that rewrite rule up there actually won't work... let me find the real one... ah, here:

RewriteRule ^page/([A-Za-z0-9-]+)/?$ index.php?p=$1 [L,QSA]

That should allow you to access pages by /zen/page/pagename




htaccess rewrite url question - biffta - 2006-08-30

If you can't find it, you're probably on a mac/linux system, and it's hidden. It's in the download, you just have to find it

I misread the intructions and ended up overwriting the delivered htaccess with a one line one of my document root! Cheers for the help!




htaccess rewrite url question - Donkikong - 2007-01-23

How would you change .htaccess so that
zenroot/customPage/` translates to index.php?page=customPage`

(I would like not to have to have /page/customPage).
Do you have to define each custom page?

Thanks for your help.

  • Donki



htaccess rewrite url question - thilakraj - 2009-07-20

I have a few urls set up like this
http://itweb.mydomain.com
http://roltaweb.mydomain.com
http://helpdesk.mydomain.com

does anybody know what to put in the htaccess file so that it'll make the urls like:

http://itweb
http://roltaweb
http://helpdesk

I tried looking through the forums search, but I couldn't find anything relevant though I think I may have been phrasing my search requests right. any help would be greatly appreciated!!?




htaccess rewrite url question - acrylian - 2009-07-20

This is not possible at all as you always need a top level domain, the ".com" in this case. This is not a Zenphoto limitation!