Append WP page only with .php

Discussion in 'WordPress' started by Nigel Lew, Apr 17, 2012.

  1. #1
    Hi folks. I am porting a site over that is part php files but had wp in /blog basically

    I am trying to avoid rewriting a bunch of urls so I have to append the pages only with a .php extension

    Scenario: There are more blog posts and they are structured as site.com/cat/postname so basically %postname% is working fine for what is on the blog section...

    However, I need to add .php to the pages only. I have tried all the plugins around and they do in fact add .php but on the actual page I am getting a 404.

    Any ideas how to do this with .htaccess or by fiddling with /includes/rewrite.php

    Thanks,
    Nigel
     
    Nigel Lew, Apr 17, 2012 IP
  2. mukulkumarsharma

    mukulkumarsharma Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This should do the trick:

    RewriteEngine on Options +FollowSymlinksRewriteBase / RewriteRule ^search/(.*) search.php?search=$1 [R]Just edit the .htaccess file
     
    mukulkumarsharma, Apr 17, 2012 IP