![]() |
mod_rewrite
Just want to let you know that I've modified my pixelpost enough using mod_rewrite that you will never see the .php extension or the ?x= in the address box.
Here is my .htaccess file: Code:
Options -IndexesFor example... if I want to see image number 31 I go to: http://photoblog.differentview.us/photo/31 If I want to post a comment on photo 31 I go to: http://photoblog.differentview.us/comment/31 The real trick is modifying the browse page to accept options like that. Browse View Cat 7: http://photoblog.differentview.us/browse/category/7 Browse View Cat 7 Page 1: http://photoblog.differentview.us/browse/category/7/1 Browse View Photos during the month of October, 2005: http://photoblog.differentview.us/br...rchive/2005-10 By using that .htaccess file and by tweaking the links that pixel post uses, you can do the same. If you would like to get your hands on some already-modified php files, check out my Post Slug addon: http://www.pixelpost.org/forum/showthread.php?t=4915 |
thanks for sharing this, i like the way this one handles the structure.
i do have a uestion, not knowing all that much about a link structure rewrite...what happens to all my old url's? will they redirect or still work? you might want to PM GeoS and talk with him about it, he's handling the rewrite system for future versions of pixelpost |
Quote:
The answer is yes, for the most part... Let me explain. Here is a link... Code:
http://www.pixelpost.org/demo/1.4.2/index.php?showimage=2Code:
http://www.pixelpost.org/demo/1.4.2/photo/2The only reason they wouldn't is when you start using relative links. the url /photo/2 is not a real folder. so if you have an image (or any link) that has a relative url the browser can't process it properly. Example: if you had a relive link like this: HTML Code:
index.php?x=browseHTML Code:
/photo/2index.php?x=browseThe trick is to make all urls absolute... Like this... HTML Code:
/index.php?x=browseThat goes for images, css and anything that is linked to. So as long as the link is set to the root directory, like it should be, everything works fine... but as soon as the links start sending to the "virtual" directories it starts messing up. Remember the slash ( "/" ) and you should be ok. |
i'm using it now! cheers.
didnt' take long to fix my links and tags to suit it: edit the rewrite a bit to include some other pages: http://photos.jlspurling.com cheers! |
That's great Joe[y]!
Glad you were able to integrate it so quickly! It's very nice too... I might add. |
i'm going to sticky this thread
|
Quote:
|
Quote:
Just place the .htacces file in the root directory. |
Quote:
See: http://klasa.born66.net .htaccess is placed in root directory of this subdomain |
Quote:
eg. http://klasa.born66.net/photo/14 http://klasa.born66.net/about http://klasa.born66.net/browse http://klasa.born66.net/browse/category/1 You get the point. So look at your templates and the source code for pixel post, and modify the links. NOTE: Make sure all your links (inc images) are set like this. /photos/photo.jpg not like: photos/photo.jpg Make sure you have the SLASH at the beginning. |
| All times are GMT. The time now is 04:29 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.