Forum Moderators: phranque

Message Too Old, No Replies

Help with htaccess rewrite rule

         

netimages

4:29 pm on Jul 3, 2009 (gmt 0)

10+ Year Member



I switched my wordpress permalinks from mysite.com/post-title to mysite.com/post-title.html. Can someone provide an htaccess rewrite rule so mysite.com/post-title redirects to mysite.com/post-title.html?

Appreciate any help.

jdMorgan

4:43 pm on Jul 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What have you tried so far? -- We can help, but it's up to you to understand the code well enough to test it and maintain it. Please review our Forum Charter (link at top of page above) for more information -- Thanks!

I should note that there is no benefit to adding a superfluous .html "filetype" to your URLs, and doing so only makes those URLs longer. You might want to re-examine your reasons for changing your URLs, since doing so is going to cost you ranking for days to months while the search engines figure out your new URL-map...

Also, be aware that your redirects will need to remain in place "forever" in order to continue recapturing traffic and PageRank/Link-popularity from your old incoming links, bookmarks, etc.

Basically, it's a really bad idea to change your URLs -- ever. Planning ahead to avoid changes is important to the success of your site, and one should not be at all "casual" about this.

Jim

netimages

5:00 pm on Jul 3, 2009 (gmt 0)

10+ Year Member



Thanks for the heads up, Jim, and the fast response.

I actually wanted to change it because Google doesn't seem to index many posts with the url just containing the post title. The blog contains over 35,000 posts, and Google after 6 months has only indexed 6000 of them, mostly tags and categories. I thought adding the .html would help with that.

But if you don't think it will, I will follow your suggestion, and leave it as is without the .html.

Any suggestions you may have in getting Google to index these posts would be appreciated.

netimages

5:02 pm on Jul 3, 2009 (gmt 0)

10+ Year Member



This is the url to the site:

<snip>

[edited by: jdMorgan at 4:35 pm (utc) on July 5, 2009]
[edit reason] No URLs, please. See Terms of Service. [/edit]

jdMorgan

4:46 pm on Jul 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Google doesn't care about "file extensions" in URLs -- whether they are .html, .php, .asp, or none at all.

Don't get involved with "guessing" about things, or getting "tricky" to improve your site's search ranking. You can quickly dig a hole that you cannot climb out of by following the "mysticism-based" approach to SEO.

You need good/useful/valuable content, incoming links from authoritative quality sites with relevant link-text, valid HTML pages, and correct server configuration. Most of the other games you read about are either futile or dangerous. And at some point you reach a point of diminishing returns, where the changes you make to your site result in no benefit, and/or the benefit is outweighed by the negative impact of the change itself (as is the case here).

A word from the inventor of the hyperlink, Sir Tim Berners-Lee: [w3.org...]

Also, have a look through these threads from our Google News forum for SEO-related topics -- especially the last one in the list: [webmasterworld.com...]

Jim