Rewriting geeklog topic urls - Mod Rewrite Geeklog Friday, July 04 2008 @ 09:26 PM  
contribute |  web resources |  past polls |  calendar |  advanced search |  site statistics |   
Topics
Home
General News (5/0)
Articles (1/3)
CommentArticle (1/0)
Display (1/0)
LinksCategory (1/0)
Linksportal (1/1)
Pollbooth (1/0)
Print (1/0)
ProfilesEmail (1/0)
SearchAuthor (1/0)
SearchTopic (1/0)
Submit (1/1)
Topics (2/0)
UserAdmin (1/0)
UserProfile (1/0)

User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User

Events
There are no upcoming events

Geeklog Sites Using Mod Rewrite
Childrens Books
Gardening Tips
Natural Health Treatments
UK Pubs and Clubs
Wireless Phones
Webmasters


Rewriting geeklog topic urls   
Saturday, September 11 2004 @ 06:45 AM
Contributed by: Admin

Hacked 2 lines in lib-common eliminating "/index.php?topic="
into
/nameoftopic/

We have a .htaccess document in the root folder that handles the articles, and i added these 2 Mod_Rewrite rules to handle topics as well:

RewriteRule ^(.*)/(.*)/$ /index.php?topic=$1&page=$2 [NC,L]
RewriteRule ^(.*)/$ /index.php?topic=$1 [NC,L]

Please Note: Very important to realise that in order to create new topics, line 1975 in lib-common.php should be in its original state. ie.
$sections->set_var( 'option_url', $_CONF['site_url'] . '/index.php?topic=' . $A['tid'] );

Only when you are happy with your topics and don't plan to add any more can you recode line 1975 to:
$sections->set_var( 'option_url', $_CONF['site_url'] . '/' . $A['tid'] . '/');

The topics are then rewritten to get rid of the question mark. If you need to add another topic, you must replace line 1975 back to its original state, else the topic will not function properly. I don't as yet know of a better way round this problem.

  [ Views: 408 ]  


Rewriting geeklog topic urls | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
What's Related
  • More by Admin
  • More from Topics

  • Story Options
  • Mail Story to a Friend
  • Printable Story Format


  • Created this page in 0.09 seconds


    Geeklog 1.3.9.1 Rewritten by Mod Rewrite Gldir

     Copyright © 2008 Mod Rewrite Geeklog
     All trademarks and copyrights on this page are owned by their respective owners.

    Powered By