|
#51
|
||||
|
||||
|
Adding the following text to your .htaccess file should do the trick:
Code:
RewriteRule ^archives/([0-9-]+)/(.*)/([0-9]+)$ index.php?x=browse&archivedate=$1&monthname=$2&pagenum=$3 The links would look like this: /archives/2006-11/November, 2006/1 To modify the links in PixelPost you will need to edit the archives addon.
__________________
Jay Williams | A Different View |
|
#52
|
||||
|
||||
|
Hi.. thanks for your help and the quick reply.. unfortunately its not working for me.. when i use the mod_rewrite you wrote, the new link just took me to the main archive page. eg: http://taufiqshariff.com/archives/20...mber,%202006/1 with all the images even if i change the month name, eg:
http://taufiqshariff.com/archives/20...pril,%202006/1 Below is how my .htaccess looks like. Code:
RewriteEngine on RewriteRule ^(links|about)/$ index.php?x=$1 RewriteRule ^archives/ index.php?x=browse&pagenum=1 RewriteRule ^archives/page/([0-9]+)$ index.php?x=browse&category=&pagenum=$1 RewriteRule ^archives/([0-9-]+)/(.*)/([0-9]+)$ index.php?x=browse&archivedate=$1&monthname=$2&pagenum=$3 RewriteRule ^comment/([0-9]+)$ index.php?popup=comment&showimage=$1 RewriteRule ^photo/([0-9]+)$ index.php?showimage=$1 RewriteRule ^photo/([0-9]+)/rating/([1-5])$ index.php?showimage=$1&rating=$2 RewriteRule ^thumbnails/latest$ index.php?showthumb=latest&thumbtag=image RewriteRule ^feed/ index.php?x=rss |
|
#53
|
||||
|
||||
|
This is just a hunch, but try placing the the the code in a little different order.
Like this: Code:
RewriteRule ^archives/([0-9-]+)/(.*)/([0-9]+)$ index.php?x=browse&archivedate=$1&monthname=$2&pagenum=$3 RewriteRule ^archives/page/([0-9]+)$ index.php?x=browse&category=&pagenum=$1 RewriteRule ^archives/ index.php?x=browse&pagenum=1 That might solve it.
__________________
Jay Williams | A Different View |
|
#54
|
||||
|
||||
|
Hey.. that worked... Thank you very much!
|
|
#55
|
|||
|
|||
|
Need some help!
I have testing all tip here for some day and need some more help.
My site at: http://modul101.com Itīs in swedish and I like swedish words to make sense of the links. I like a link like this: http://modul101.com/index.php?showimage=65 looks like this: http://modul101.com/bild/65 (this one works when I write the URL in my browser) And a link like this: http://modul101.com/index.php?x=browse looks like this: http://modul101.com/arkiv (Can write the URL but donīt see any thumbs) This is the .htaccess, just a test gonna delete som rows later: PHP Code:
I have done some changes but need more to make everything work ok. My changes: Browse should be Arkiv About should be Info Excuse me my spelling and bad english... Last edited by SweMike; 12-12-2006 at 10:15 AM. Reason: More info |
|
#56
|
||||
|
||||
|
Try to change:
Quote:
Quote:
|
|
#57
|
|||
|
|||
|
EDIT!
Got the links at the main page works, changed both index.php and the template-image.php If anybody have some info what to change to make the browse page links look the same, please drop a line. (Browse = http://modul101.com/arkiv ) It must be a some change of the code in index.php I belive? Something with the >THUMBNAILS> tag??? Site: http://modul101.com Last edited by SweMike; 12-13-2006 at 07:42 PM. Reason: More info |
|
#58
|
||||
|
||||
|
Ok, I am trying to get
www.sitename.com/index.php?x=browse and www.sitename.com/index.php?x=about to display like www.sitename.com/browse and www.sitename.com/about I have the following in my .htaccess file, Code:
RewriteEngine On # Post Slug Addon RewriteRule ^([a-z0-9-]+)$ index.php?photoslug=$1 RewriteRule ^(browse|about)$ index.php?x=$1&pagenum=1 When I click either of these links it brings up a blank page with the following words typed on it: Coming Soon! Nothing to show. No image to show here! What am I doing wrong here? I am using the POST SLUG addon. Is this messing with it? I don't understand modRewrite at all!
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#59
|
||||
|
||||
|
This is interesting.
I switched the order of the rewrite rules to Code:
RewriteEngine On RewriteRule ^(browse|about)$ index.php?x=$1&pagenum=1 # Post Slug Addon RewriteRule ^([a-z0-9-]+)$ index.php?photoslug=$1 Why does it make a difference? can someone explain to me why when this: RewriteRule ^(browse|about)$ index.php?x=$1&pagenum=1 is placed bellow this: RewriteRule ^([a-z0-9-]+)$ index.php?photoslug=$1 It does not work but if revered it functions as it would.
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#60
|
||||
|
||||
|
Quote:
When you uses mod_rewrite it starts with the first rule and progresses to the last one. The rule ([a-z0-9-]+) means any page that uses the letters a through z as well as numbers and hyphens would return true. Both "browse" and "about" fit in that category. So it would get a match and try to load the page "index.php?photoslug=about". And as you can see, that page doesn't exist. But if the rule (browse|about) is first, and the page you are trying to load is "about", that rule will return true, skipping any further rules. It will then try to load the page "index.php?x=about&pagenum=1", which would be correct. Hopefully that explains it for you. If not, let me know and I will try again. :-)
__________________
Jay Williams | A Different View |
| Post Reply |
| Thread Tools | |
|
|