homepage Welcome to WebmasterWorld Guest from 54.167.10.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
redirection of pages after a certain url
may belong in different forum
icpooreman




msg:1260073
 3:15 pm on May 21, 2006 (gmt 0)

I want to build a dynamic forum where I parse the url with php to determine what is displayed. So if my URL is site/forum/topic1 I look up topic1 in my DB and everything under that can be displayed. My question is since there is no actual site/forum/topic1 page how do I make my server treat that url as if it were site/forum?q=topic1.

 

jjwdesign




msg:1260074
 3:25 pm on May 21, 2006 (gmt 0)

Apache Mod Rewrite Rules.

These rules can be placed in your document root .htaccess file. See the apache module documentation for more information.

For example: This might work ;)

RewriteRule ^([^/\.\s]+)\/([^/\.\s]+)\/([^/\.\s]+)\/$ /index\.php\?site=$1&forum=$2&topic=$3 [L]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved