mod_rewrite troubles
-
I’ve tried the following (generated by WordPress from “/%year%/%monthnum%/%day%/%postname%/”). With the first and last lines, the permalinks 404 (aren’t found). Without them? 500 Internal Server Error.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /phillip/weblog/
RewriteRule ^category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /phillip/weblog/wp-feed.php?category_name=$1&feed=$2 [QSA]
RewriteRule ^category/?(.*) /phillip/weblog/index.php?category_name=$1 [QSA]
RewriteRule ^author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /phillip/weblog/wp-feed.php?author_name=$1&feed=$2 [QSA]
RewriteRule ^author/?(.*) /phillip/weblog/index.php?author_name=$1 [QSA]
RewriteRule ^([0-9]{4})/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /phillip/weblog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
RewriteRule ^([0-9]{4})/?([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ /phillip/weblog/wp-feed.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA]
RewriteRule ^([0-9]{4})/?([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$ /phillip/weblog/wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /phillip/weblog/wp-feed.php?feed=$1 [QSA]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /phillip/weblog/wp-feed.php?feed=$1&withcomments=1 [QSA]
</IfModule>
I’m using XAMPP for Windows, which is a combination of Apache 2.0.48, PHP 4.3.4, and Perl 5.8.2. In the apache/modules directory, mod_rewrite is definitely there. Thoughts?
- The topic ‘mod_rewrite troubles’ is closed to new replies.