Permalinks for Pages in WordPress Made Simple
When I first fired up WordPress 1.5.1.2 I almost gave up on it prematurely because the new ‘Pages’ feature seemed to require two unacceptable options if I was to use permalinks (for more user-friendly urls):
- chmod .htaccess to world writable
- update .htaccess every time I wanted to add a new ‘page’
After some thorough searching through the forums, I came across some tips that solved the issue and made it possible to add pages without changing .htacess one bit.
(I found the solution before creating this blog, otherwise I’d provide a link to the source, but I can’t seem to recall where I found this info.)
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php/$1
</ifmodule>
3 Responses to “ Permalinks for Pages in WordPress Made Simple”
Leave a Reply
Syndicate
Categories
- Customer Service (1)
- Entrepreneurs (1)
- Marketing (3)
- Programming (9)
- Web Design (1)
- WordPress (5)




Bennett says:
June 10th, 2005 at 3:40 am
I never had this problem; my .htaccess permissions are 644, and I don’t have to do anything extra when I create a new page.
It might depend on how PHP is installed. My host uses PHPsuexec (or is it suphpexec?) which causes the PHP process to run as me rather than the apache user. I think this is why my .htaccess doesn’t have to be world-writable.
Your solution looks useful though — I wonder why we don’t hear more about this problem?
Administrator says:
June 10th, 2005 at 10:52 am
I don’t know why you don’t hear about this more often. I guess folks just put up with it. Either that, or they’re using WordPress first and foremost for adding posts, not pages.
With the addition of ‘pages’ WordPress seems to be adding CMS capabilities.
Anyhow, here is a page in the codex that people can read for more information:
http://codex.wordpress.org/Using_Permalinks
And a post from a WordPress user experiencing the difficulties I described in my post.
http://wordpress.org/support/topic/34953
marco garcia says:
August 8th, 2005 at 1:43 am
hello, i found this WP SEO tip on http://blogging.typepad.com/how_to_blog/2004/08/how_to_configur.html
and was wondering if i could use this with your plug in. the reason is that i want to have my permalinks named like the post. do you know if it will work fine? i’m freshly designing two sites (first time using WP) and i wanted to maximize my customers chances of getting visits.
RewriteEngine On
RewriteBase /
RewriteRule ^category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2 [QSA]
RewriteRule ^category/?(.*) /index.php?category_name=$1 [QSA]
RewriteRule ^author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2 [QSA]
RewriteRule ^author/?(.*) /index.php?author_name=$1 [QSA]
RewriteRule ^([_0-9a-z-]+).htm([0-9]+)?/?$ /index.php?name=$1&page=$2 [QSA]
RewriteRule ^([_0-9a-z-]+).htm/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?name=$1&feed=$2 [QSA]
RewriteRule ^([_0-9a-z-]+).htm/trackback/?$ /wp-trackback.php?name=$1 [QSA]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1 [QSA]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1&withcomments=1 [QSA]