mod_rewrite problem (2 posts)

  1. aleck
    Posted 10 years ago #

    I'm having WP hosted at DreamHost, and trying to set .htaccess file for nice URLs. This is the content of the .htaccess file, which resides in the site root.
    Options +FollowSymLinks +MultiViews
    RewriteEngine on
    RewriteBase /
    RewriteRule ^([~\/]+)$ /index.php?category_name=$1 [L]
    # 404
    ErrorDocument 404 /404.php
    However, when I try some url like http://site_name/life/ if moves me to 404.php I specified in the last line.
    What am I doing wrong? Is the rule bad, or had DreamHost turned something off so this does not work?
    I asked the support there, and they said that mod_rewrite is on, but that they don't offer help of setting up custom rewrite rules.
    This thing is really driving me crazy...

  2. aleck
    Posted 10 years ago #

    Yipi. I got it. Rewrite rules was wrong. This is the correct one.
    RewriteRule ^([^\/]+)/$ /index.php?category_name=$1 [L]

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.