SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member
    Join Date
    Feb 2005
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thread title in mod-rewrite?

    I have searched around but have been unable to find my answer. Currently my .htaccess looks like this

    RewriteEngine On
    RewriteRule ^([0-9]+)\.html$ index.php?module=cheats&cheat=$1 [L]

    so the page (index.php?module=cheats&cheat=1223) now looks like (1223.html)

    I was wondering is it possible to put my forums thread title in the url?? I am currently using PHPBB

    Thanks

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    lcp03o

    Yes, that's possible - IF your title is unique (i.e., a key in your db) AND you've taken care to replace any spaces with underscores (or other characters that your index.php can understand).

    This is discussed VERY briefly in the article at datakoncepts.com/seo after all the introductory setup and overview.

    All you really need to be able to do is create regex so your rewrite rule can redirect to index.php with something for it to use to fetch your article.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    Non-Member
    Join Date
    Feb 2005
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks like a good guide. Thanks

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    lcp03o,

    Quote Originally Posted by lcp03o
    Looks like a good guide. Thanks
    Glad that it helped.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •