• I’ve just started testing WordPress, my main emphasis is to use it for sites which are mainly Pages, as opposed to posts. I have Permalinks on for pretty urls.

    Looking at the .htaccess after adding just a few pages, it seems 5 lines get added to this for every Page I add. With many hundreds of pages planned for the initial site, processing a really long .htaccess could get inefficient.

    Is there any more generic way to set up the .htaccess so that multiple lines don’t get added for every single page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks podz. I had the same issue, and I dropped boren’s code over what was previously there, and everything seems fine. Now, should I reset the permissions on my .htaccess file to 644 to prevent WordPress over-writing it to what it was before?

    On the same topic, I notice that for pages (not posts), where the regular URL I’m internally linking to is ww*.domain.com/page-slug/ I can omit the trailing slash and the page still displays, but in the address bar is shown as ww*.domain.com/page-slug

    For some reason, Yahoo insists on crawling the slashless version, with the result that it sees the site as having no internal links (hence virtually no Yahoo traffic ever since I set up WordPress).

    My internal links to posts (not pages) are in fact ww*.domain.com/76 etc, with no trailing slash.

    Now that I have that nice simple .htaccess file, is there anything I can add to it to rewrite ww*.domain.com/string-string so that for pages (not posts) there is always a trailing slash?

    Further to this… looking around, I have noticed that on at least one senior member’s WordPress site where Pages are used, that Yahoo is routinely indexing the non-trailing slash versions (ww*.domain.com/page-slug) which has no Google PageRank, instead of the correct trailing slash version (ww*.domain.com/page-slug/) which is indexed by Google with the correct PageRank.

    So I am suggesting a way needs to be found to rewrite non-trailing slashed WordPress Page URLs to ones with a trailing slash, otherwise there is a risk of not receiving any traffic from Yahoo.

    Added:

    At Webmasterworld I posted a thread on how Yahoo is incorrectly indexing trailing-slashed pages, but it was not approved. I think this is an issue that could at least be addressed within the WordPress community, as I have now seen other members pages here that show the same problem. Maybe an easy fix for someone who knows their way around .htaccess (as I have also seen that some members have fixed the problem).

    Or correct me if I’m wrong…

    Unfortunately the 5-line alternative affected the WordPress search function, so I have for the time being reverted back to the default. Never mind.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Keeping htaccess to a reasonable length’ is closed to new replies.