Question

I am using wordpress and use custom permalink structure: /%category%/%postname%/

My problem is that a decent number of people link to the site without including the trailing slash in the URL, so users get a 404 page.

I'm using the default .htaccess file that comes with wordpress because no solution I've tried has worked. I've tried using the Redirection plugin, with no success.

I'd gladly link to the site, but I don't want it to be construed as self-promotion. If you ask, I'll provide a link.

Could anyone help me find a plugin or provide some .htaccess entries to help resolve this?

Thanks very much!

Was it helpful?

Solution

A very good reference for all things .htaccess is PerishablePress.com

http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/

OTHER TIPS

Use:

/%category%/%postname%(/?)

in your .htaccess file.

The question mark denotes an optional character sequence.

RewriteRule ^(([^\/]+\/)*[^\/\.]+)$ $1/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top