How Do I Set Some Pages In Wordpress To Have The .php Extension?

by Khovai
9 replies
  • WEB DESIGN
  • |
EDIT: SOLVED

For anyone else who may come across this issue in the future, I'm afraid the best way to do this is to setup some 302 soft re-directs. I personally preferred to use a plugin for this but if you really really want to, you can do it manually as well.

The plugin was called "404 redirected" and does the job thus far. It's not the best solution in the world but it's the easiest to implement (should you ever have a client that requires this).

I have a unique problem here. I have a client who is dead set and persisent on having SOME of her pages end in .php. However, she doesn't want all of them to end in .php. She has her reasons I guess and she's not going to budge on it.

I've tried to install a plugin called Page Extension and it worked.. somewhat. Half the time the pages saved as .php would load and half the time they wouldn't.

Does anyone have any ideas on how to accomplish this? I'm stumped.

I've found plugins that'll apparently rename the entire website to .php but she doesn't want that.

Can this even be done with a Wordpress site?

Also, I installed a plugin called NextGen Gallery to get a quick gallery up and running and it broke a lot of crap. My error_log it spammed with messages like this after installing that plugin:

"WordPress database error Table 'xxxxxxx_xxxx.wp_posts' doesn't exist for query SELECT * FROM wp_posts where post_name='php-test' made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), call_user_func_array, wp_fake_url->check_url"
The reason she wants these .php extensions so bad is because she's running a diving company/dive shop and I guess a bunch of travel agencies have all of these links from their original site. They get around 200-300 visitors a day to some of these pages already. Is there any way to setup some kind of re-direct so when people try to visit blah/blah.php they'll be re-directed to blah/blah?

If there's absolutely no way to only make SOME pages .php or re-direct something like that, I guess I'll have to tell her but I'll probably lose that client.
#extension #pages #php #set #wordpress
  • Profile picture of the author kpmedia
    You can't -- not without massive manual syntax maintenance in htaccess.

    A better option is to 301 the old URLs.
    Some one-time htaccess work will be needed.

    I'd dump the customer. She's being ridiculous.

    And if you're a developer, and charging customers, how come you don't already know this?
    {{ DiscussionBoard.errors[9434033].message }}
    • Profile picture of the author SJL
      If your permalink structure is /category/postname then the redirects should work automaticly by default. No plugins required.

      For example
      domain.com/articles/freedom.php automaticly redirects to
      domain.com/articles/freedom/

      Originally Posted by kpmedia View Post

      I'd dump the customer. She's being ridiculous.
      How's not wanting to lose hundreds of targeted visitors daily ridiculous?
      {{ DiscussionBoard.errors[9434204].message }}
      • Profile picture of the author kpmedia
        Originally Posted by SJL View Post

        How's not wanting to lose hundreds of targeted visitors daily ridiculous?
        That method is ridiculous -- not the goal.
        {{ DiscussionBoard.errors[9434292].message }}
      • Profile picture of the author Khovai
        You can't -- not without massive manual syntax maintenance in htaccess.

        A better option is to 301 the old URLs.
        Some one-time htaccess work will be needed.

        I'd dump the customer. She's being ridiculous.

        And if you're a developer, and charging customers, how come you don't already know this?
        She's also paying a lot of money and owns several businesses.

        This isn't an issue I have ever run into before. I have never had someone who wanted specific page extensions on only some of their pages or wanted them at all for that matter.

        She already has a website set up and we're going to be replacing it with a Wordpress site. Her current site isn't Wordpress and was developed quite a while ago.

        i will advice you strongly to serve you client the best he or she needed,concerning the php,do it fine and if you have any worries,google can help you alot.
        thank you.....
        I'm afraid I don't follow what you're trying to say.
        Signature
        Offering Writing/Content Services (And Not For Cheap)
        Just 1 quality article is far better than 20 cheap $5 articles
        {{ DiscussionBoard.errors[9434471].message }}
      • Profile picture of the author SJL
        Originally Posted by kpmedia View Post

        Originally Posted by SJL View Post

        How's not wanting to lose hundreds of targeted visitors daily ridiculous?
        That method is ridiculous -- not the goal.
        Mostlikely because she doesn't fully understand the situation. These are the kind of situations that seperate beginners from the professionals.

        Whatever the designer/developer is doing, they should be able to tell the customer why they are doing it and how it achieves the clients need(s).

        (Yea I know, it kinda turned into a rant.)
        {{ DiscussionBoard.errors[9437384].message }}
  • Profile picture of the author trafficparadise
    i will advice you strongly to serve you client the best he or she needed,concerning the php,do it fine and if you have any worries,google can help you alot.
    thank you.....
    {{ DiscussionBoard.errors[9434397].message }}
  • Profile picture of the author ThomasDWright
    For anyone who may come across this issue in the future, I'm afraid the best way to do this is to setup some 302 soft re-directs. I personally preferred to use a plugin for this but if you really really want to, you can do it manually as well.

    The plugin was called "404 redirected" and does the job thus far. It's not the best solution in the world but it's the easiest to implement (should you ever have a client that requires this).
    {{ DiscussionBoard.errors[9435053].message }}

Trending Topics