The MU forums have moved to WordPress.org

.htaccess Rewrite help, please (2 posts)

  1. jshare
    Member
    Posted 15 years ago #

    Due to a goof on my part, my sitemap.xml file had tag urls like this:
    http://jobmob.co.il/blog/index.php?tag=example

    But onsite they were always like this:
    http://jobmob.co.il/index.php?tag=example

    I've since corrected the sitemap generation but now Google Webmaster tools lists many links of the first kind that go nowhere. I figure a simple .htaccess rewrite would solve that problem. I've taken a few stabs at it, but nothing working so far.

    RewriteRule ^(.*)?/blog/index.php?tag=(.*) /index.php?tag=(.*) [R=301,L]

    Any idea why this isn't working?

    Also, know of a good site for testing RewriteRules? I'm imagining something like many regular expression sites, where the site tells you what result your attempt will give for a certain text. In this case, it could be a list of urls.

  2. jshare
    Member
    Posted 15 years ago #

About this Topic