Forums

mod_rewrite working but cant add extension(.php) (8 posts)

  1. MrMatts
    Member
    Posted 1 month ago #

    Hey I am new to Wordpress and i just want to setup Wordpress so i can get article name + extension

    So i have figured out that i have to set permalinks to : /%postname%/

    This is what i want

    http://www.mysite.com/very-nice-nice-article.php

    With my current config i get
    http://www.mysite.com/very-nice-nice-article

    But no extension.

    I have tried to add /%postname%/.php but that does not seem to work.

    this is how my htaccess file looks like

      # BEGIN WordPress
      Options +FollowSymlinks
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
      </IfModule>

      # END WordPress

    How can I add extension .php to my current config?
    I would be glad if somebody could help me with this, I am sure its something simple :)

    -MrMatts

  2. TransPersonal
    Member
    Posted 1 month ago #

    Hi,

    Sorry I don't have a solution for you but just out of curiosity why do you want the file extension to show? I don't think it helps in SEO in any way and if anything, it might even hinder SEO as it is just a few extra characters that are unrelated to the post's topic.

  3. MrMatts
    Member
    Posted 1 month ago #

    Hey and thanks for the input.

    Yeah well it was with SEO in mind, to get my page as well set for SEO as possible. But you might be right that i might not need any extension when thinking in SEO perspective.

  4. TransPersonal
    Member
    Posted 1 month ago #

    Yes, when optimizing URLS for SEO you absolutely don't want any unrelated terms that doesn't have anything to do with your post topic. Say there are two posts written about the same thing and both are equally optimized. One uses:

    http://mysite.com/obama-wins-election/

    and the other uses:

    http://mysite.com/obama-wins-election.php/

    The former will most likely be preference by search engines in determining page rank order. You also want the main keyword to be as towards the left as possible. So if your keyword is "Michel Jackson" try to use:

    /michel-jackson-songs/

    instead of:

    /songs-of-michel-jackson/

  5. MrMatts
    Member
    Posted 1 month ago #

    Hey again and thanks for the fast response.

    Yeah it makes sense but its just to me it looks kinda corny without extension but in Google spider perspective it probably don“t.

    Without extension its like: http://www.mysite.com/wants-to-spam-google-with-some-random-bs-and-rank-high-plz

    :-)

    -MrMatts

  6. TransPersonal
    Member
    Posted 1 month ago #

    He he, Well Matt Cutts seems to agree with you:

    http://www.youtube.com/watch?v=dSG6C33GwsE
    http://www.mattcutts.com/blog/

    But in my defense there are plenty of high ranking websites without the file extension in the URL :)

    Keep the thread open, I'm sure someone can tell you how it can be done.

  7. brianv72
    Member
    Posted 3 weeks ago #

    I too would like to see how to do this.

  8. michaelkostal
    Member
    Posted 2 weeks ago #

    I found a plugin that does this for HTML. If you find all "html" and replace with "php" it works, but I get a server error in IE6...

    http://www.introsites.co.uk/33~html-wordpress-permalink-on-pages-plugin.html

Reply

You must log in to post.

About this Topic