Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 01:55 pm EST
Geeklog Forums
url rewrite to in show /topic/story
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
I am trying to make the story url to include it's topic. Could someone show me how to rewrite the url of the stories to include topic so that it would look like:
in stead of the current url rewrite that displays
I remember seeing it on this or some other forum, but can't find it.
Thanks,
Sam
http://domain/topic/story
orhttp://domain/topic/article.php/story
in stead of the current url rewrite that displays
http://domain/article.php/story
I remember seeing it on this or some other forum, but can't find it.
Thanks,
Sam
9
8
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
I'm using this functions in .htaccess for each topic;
RewriteRule ^topics/(.*) index.php?topic=$1
RewriteRule ^topicid/index.php index.php?topic=topicid
RewriteRule ^topicid/article.php/(.*) article.php/$1
RewriteRule ^topicid/(.*) article.php/$1
RewriteRule ^topicid/(.*)/index.php article.php/$1
Replace topicid with the topicid's, use this sequence, and change the templates of course. You can see in in action over
here.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Text Formatted Code
RewriteEngine onRewriteRule ^topics/(.*) index.php?topic=$1
RewriteRule ^topicid/index.php index.php?topic=topicid
RewriteRule ^topicid/article.php/(.*) article.php/$1
RewriteRule ^topicid/(.*) article.php/$1
RewriteRule ^topicid/(.*)/index.php article.php/$1
Replace topicid with the topicid's, use this sequence, and change the templates of course. You can see in in action over
here.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
11
13
Quote
All times are EST. The time is now 01:55 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content