• Hello!

    I am wondering if it’s possible to eliminate wordpress writing to .htaccess everytime a new Page is created.

    With Permalinks enabled, wordpress will create entries like these in the .htaccess everytime a new page is created.

    example:

    RewriteRule ^(page_slug)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(page_slug)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(page_slug)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(page_slug)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(page_slug)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]

    For each new page created, wordpress will create 5 rewrite rules. so if you have 100 pages then you’ll get 500 rewrite rules in your .htaccess file.

    My current site structure are the following:
    example.com/category/post-slug/
    example.com/page-slug/

    The Posts work great for me and I like it, but I would like to have the Page structure like this
    example.com/page/page-slug/ (so only one set of rewrite rules are needed for Pages) instead of this example.com/page-slug/

    Does anyone know how to solve this without letting wordpress create additional RewriteRules?

    Thank you very much;)

Viewing 1 replies (of 1 total)
  • Hi nrvx,

    I’m not an expert, but I believe the way permalinks are handled have been changed in WordPress 2.0. In 2.0 it will make only one change to .htaccess if you turn on permalinks then everything is handled from within WordPress.

    However, it seems lots of folks (and myself) are having problems getting permalinks to work with 2.0. I’d say wait for those to get ironed out then upgrade to 2.0 (or install and test 2.0 yourself)

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Page Permalink and .htaccess’ is closed to new replies.