WordPress.org

Ready to get started?Download WordPress

Forums

Masking category URL through .htaccess (2 posts)

  1. dubayan
    Member
    Posted 6 months ago #

    Hi,

    Basically I'm trying to use mod rewrite in htaccess so that whenever someone accesses sample.com/reviews they see the content of sample.com/category/reviews without the URL changing.

    Any idea how this is done? I couldn't find a solution since I don't really understand regex.

    Your help is much appreciated

  2. Pioneer Valley Web Design
    Member
    Posted 6 months ago #

    Add this above WP rewrite rules.

    <IfModule mod_rewrite.c>
    RewriteRule ^category/(.+)$ http://www.sample.com/$1 [R=301,L]
    </IfModule>

Reply

You must log in to post.

About this Topic