“Almost-Pretty Permalinks” Won’t Get Pretty
-
I’m updating my permalink structure to:
/archives/%postname%/
I put this under the “custom” field on the permalinks configuration page in the dashboard. I edited my .htaccess file thus:
<IfModule mod_rewrite.c>
RewriteEngine On
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-]+)([0-9]+)?/?$ /index.php?name=$1&page=$2 [QSA]
RewriteRule ^([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?name=$1&feed=$2 [QSA]
RewriteRule ^([_0-9a-z-]+)/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]
</IfModule>All the links work absolutely fine, except for the part where they are not pretty as I intended them to be. For example, instead of https://…/archives/zappa-err-zeta/ I get https://…/index.php/archives/zappa-err-zeta/. Taking out the “/index.php” out of the address bar goes to a 404 page.
- The topic ‘“Almost-Pretty Permalinks” Won’t Get Pretty’ is closed to new replies.