Forum Moderators: phranque

Message Too Old, No Replies

Find and replace duplicated directory to the original directory

htaccess .htaccess apache find replace

         

deezin

11:19 pm on Oct 24, 2018 (gmt 0)

10+ Year Member



I can't figure this one out so thank you in advance for the help. How would I find any occurrence of "/articles/articles" and redirect it to "/articles/".

For some reason Google Webmaster Tools has a bunch of my pages in "/articles/articles" when it should be in "/articles/".

Thank you in advance.

lucy24

3:52 am on Oct 25, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<begin boilerplate>
What have you tried so far, and what happened in each case?
</end boilerplate>

While you're at it, spend some time fine-tooth-combing your site code to make sure you're not sending those erroneous links yourself by mistake. A few years back I was much vexed with Google requests for /directory//subdir/blahblah --a harder redirect, because you need a RewriteCond to pick up the double slash--and it finally turned out I'd goofed in one small place and I couldn't just blame Google's fevered imagination. Oops.