• Hi,

    I found a mod_rewrite function that disable the need of the category base. The only problem is that it require “.html” in the end.

    I have a page structured like: page.com/category/subcategory/post.html I’m looking for a solution like: page.com/category/subcategory/post or page.com/category/subcategory/post/

    Does anyone know what to do, and if i can use mod-rewrite for this? The solution i use today is:`<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php/$1 [L]
    RewriteRule category_base_name/(.*) %{DOCUMENT_ROOT}/$1 [R=301,NC,L]
    </IfModule>`

    The custom structure is /%category%/%postname%.html

    It doesn’t work to skip .html in the custom structure.

The topic ‘mod_rewrite disable category base’ is closed to new replies.