Hoping someone with better knowledge of mod_rewrite will find this question simple. I’ve taken over duties of a website for a company and am trying to do some SEO on it. The permalink structure was
when I took control and I’ve changed it to simply %postname%. Everything on the site works fine, however, Google has over 1000 links point to the old urls
which throw 404 errors. I’ve tried a couple of plugins to fix the problem but they didn’t work so I’m trying to learn my way around mod_rewrite to fix this.
I’ve tried (and I’ve not optimized the regex just so I can read it better)
^/([0-9])([0-9])([0-9])([0-9])/([0-9])([0-9])/([0-9])([0-9])([0-9])([0-9])/(.*?)/(.*?) /$5 [L]
However, this still hits a 404 page.
Any pointers would be great … thanks!
- The topic ‘mod_rewrite / htaccess question’ is closed to new replies.