SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast chetan_sachania's Avatar
    Join Date
    Apr 2004
    Location
    India
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using .htaccess for PHP Form

    Hi All,

    I Just started PHP forum.
    I want to make Search Engine Friendly url of my forum by using .htaccess. can anybody tell me how can i make ? and how??
    Regards,
    Friends Area
    Chetan Sachania
    Template Zone

  2. #2

  3. #3
    SitePoint Guru gavwvin's Avatar
    Join Date
    Nov 2004
    Location
    Cornwall, UK
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I assume your forum would have something like /forum/showthread.php?thread=1245 (like this site). You would use a htaccess file and do something like:

    RewriteEngine On
    RewriteRule ^forum/([0-9]+)\.html /forum/showthread.php?thread=$1

    That when any page was requested with forum/<a number>.html it would actually show the page /forum/showthread.php?thread=<that number>

  4. #4
    SitePoint Addict launchcode's Avatar
    Join Date
    Dec 2004
    Location
    Bristol, UK
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the mod_rewrite examples above - or just don't care too much about it? It's a phallacy that "search engines won't index my site if it has a ? in the address" - because all of the search engines that actually matter will do so regardless.

    If you want to make your site just look cleaner / obscure the data a bit then that's another (and perfectly valid) reason to use mod_rewrite. But if it's just for search engines I honestly think you may be spending wasted time on this. The very fact that various SitePoint forum threads appear within Google should be a good enough indication.

    Cheers,

    Rich
    Richard Davey

    Launchcode
    PHP Security Guide. Think your scripts are secure? Think again.

  5. #5
    SitePoint Enthusiast chetan_sachania's Avatar
    Join Date
    Apr 2004
    Location
    India
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Thanks for your Answers.

    I read it in many forums that, this kind of urls are not much Search Engine Friendly.
    But i am definatly sure that i will be User Friendly.
    Anyway still it is Question that is this kind of urls are really Search Engine Friendly or not???
    Regards,
    Friends Area
    Chetan Sachania
    Template Zone

  6. #6
    SitePoint Addict launchcode's Avatar
    Join Date
    Dec 2004
    Location
    Bristol, UK
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the search engines that matter (Google, MSN, Yahoo, etc) - they don't care less. Perhaps for the smaller / more-specific / older ones it might fail, but I'd love to know how many people truly use them.
    Richard Davey

    Launchcode
    PHP Security Guide. Think your scripts are secure? Think again.

  7. #7
    SitePoint Guru gavwvin's Avatar
    Join Date
    Nov 2004
    Location
    Cornwall, UK
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you use mod_rewite to make it appear as if each thread is actually a separate page, google will count them as separate pages- having more pages in your site (all linking back to the home page) will increase the home page's google rank.


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
  •