WordPress.org

Ready to get started?Download WordPress

Forums

Need to know where the /p= variable goes (4 posts)

  1. sryuuza
    Blocked
    Posted 8 years ago #

    I just upgraded from a Geo Metro to a H2(without all the environmental effects) when I moved from bblog to wordpress, my only issue now is that i dont want to lose any links, this I need http://blog.defunctgames.com/?postid=245 to go to http://blog.defunctgames.com/?p=245

    I found that I cant just use a simple mod_rewrite, as it is a variable to the index.php page, and not an actual page its self.

    I went digging through the pages only to find that I cant seem to figure out where the $_GET['p'] variable is accepted, and used... because i need to also make $_GET['postid'] to become the same variable.

  2. VaamYob
    Member
    Posted 8 years ago #

    Who says you can't use rewrite ?

    This link is a good source of information for what you actually CAN do with rewrites.

    Specifically for your needs, check out the section called "Backward Compatibility for YYYY to XXXX migration"

    http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

  3. sryuuza
    Blocked
    Posted 8 years ago #

    hmm, I have neverworked with mod_rewrite like that, what would i have to do to make it work... cuz technically the old page was index.php?postid=245 and the new page is index.php?p=245

    so the file name is the same, the variable is different

    shouldnt this code work??

    RewriteRule /index.php?postid=(.*)$ /archives/$1

    im using the WP mod_rewrite feature for permalinks so...
    http://blog.defunctgames.com/?postid=245 would now be
    http://blog.defunctgames.com/archives/245

  4. Why not enable "Pretty Permalinks" in Options/Permalinks? They look much cleaner.

    http://codex.wordpress.org/Introduction_to_Blogging#Pretty_Permalinks

Topic Closed

This topic has been closed to new replies.

About this Topic