Can't mod_rewrite /archives/
-
I’m trying to remove a directory from any URLS that contain it. It’s a wordpress blog.
Currently the following urls 404, and probably many others:
site.com/blog/archives/yyyy/mm/dd/
site.com/blog/archives/yyyy/mm/dd/post-title/
site.com/blog/archives/author/usernameHowever, all of these urls work fine when they are in this format:
site.com/blog/yyyy/mm/dd/
site.com/blog/yyyy/mm/dd/post-title/
site.com/blog/author/usernameSo pretty much I need to take any url that has the directory /archive/ in it, regardless of what comes after it, and remove it. I’ve tried lots of example online with no luck.
The last thing I tried was this, thinking it would be a very broad rule and work.
RewriteRule (.*)/archives/(.*) $1/$2 [NC]
Didn’t do anything.
Nothing at all seems to work. I can’t seem to do anything to rewrite /archives/ to get rid of it.
The topic ‘Can't mod_rewrite /archives/’ is closed to new replies.