mod_rewrite to make a short URL

I have a url like:

http://skepticalgamer.com/category/slam-the-controller

I’d like to strip out “category” from the URL. So I’d want:

Read More
http://skepticalgamer.com/slam-the-controller

to act as if it were the original URL above. Is that something that can be done with mod_rewrite?

Related posts

Leave a Reply

2 comments

  1. Yes, you could do this with mod_rewrite by doing something like this:

    RewriteRule ^slam-the-controller$ category/slam-the-controller
    

    This will take the URL:

    http://skepticalgamer.com/slam-the-controller
    

    and rewrite it to:

    http://skepticalgamer.com/category/slam-the-controller