• I am having some trouble getting permalinks to work with my blog. So after I enabled it, I added the following lines to my .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/category/?(.*) /index.php?category_name=$1 [QSA]
    RewriteRule ^archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/author/?(.*) /index.php?author_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/? ([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/ /(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/ /trackback/?$ /wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [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]

    After I did that my website got an HTTP 500 internal server error. I also read https://faq.wordpress.net/view.php?p=20, and tried some of the stuff mentioned there like adding

    Options +SymLinksIfOwnerMatch
    and
    <ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /YOURPATHHERE
    </ifmodule>

    But nothing seems to work. I am also not sure how I would check if my mod_rewrite is enabled or not. Any help would be appreciated, sorry Im not too familiar with these kind of things.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Anonymous

    Oh well i Just used /index.php/archives/%year%/%monthnum%/%day%/%postname%/ that for my permalink structure, and it still works without any modifying of the .htaccess file ??

    Did you put the ifmodules around the rewrite rules?
    `<ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /YOURPATHHERE
    ALL OF THE REWRITERULES
    </ifmodule>’

    Thread Starter Anonymous

    I got it working in the end, I downloaded a template file Kubrick https://binarybonsai.com/kubrick/ from there and compared a htaccess file the template had with my own and I found my problem.

    What was the problem?
    If you could post an explanation it might help someone in the future

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘— Help — Permalinks’ is closed to new replies.