Redirect 301 multiple url to frontpage
-
I have a lot of /dummy.php/xxx pages that i would like to redirect to the front page.
/dummy.php/100
/dummy.php/101
/dummy.php/102
.....redirect 301 /dummy.php/WILDCARD http://www.domain.com
I can not figure it out?
-
Super Jeff
You saved my day
-
I would test this, and it might work differently according to your server setup, but you could try the RedirectMatch command like this if your site uses mod_alias:
RedirectMatch 301 ^/dummy.php/.*$ http://www.domain.com/
Or with mod_rewrite, this might be the way to go:
RewriteRule ^dummy.php/ http://www.domain.com/ [R=301,L]I hope this helps!
-- Jeff
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Correctly Dealing With Redirects
Hi, Hope someone might be able to help me with this. One of our sites was built badly and the orginal url structure was to have mydomain.com/index.php but these have been changed to mydomain.com by a developer who has put the redirects in place. The problem is that in webmaster tools my link count has dropped to 18 from nearly 2300. I am assuming that Google is not seeing the redirect, any advice would be greatly appreciated. Thanks
Link Building | | mitonmark0 -
Site URL called out but not clickable.
Hi - I'm after a bit of clarity; if my site URL is referenced in an article, but doesn't actually link through, does this still 'add value' to my seo efforts? Thanks, David
Link Building | | newstd1000 -
301 redirect on yahoo hosting
Hi, I was wondering if anyone could lend some advice to getting a 301 redirect on yahoo web hosting; I spoke with someone in SEO and they referred me to a site that had step by step instruction, the only problem is that was for the yahoo store, my business is not e commerce rather a service website. I was wondering if anyone had the same problem, some say that Yahoo does not offer "301 redirects" on their hosting, however, they say there are methods to cirumvent that, my site is html. Any suggestions would be great - thanks best regards, James C
Link Building | | jimmy02250 -
Is it good practise to do a 301 redirect from domain.co.uk to www.domain.co.uk?
As the title says really, I'm sure the answer is Yes, but I cannot remember why probably one of the many things I read somewhere along the line and can't recall the reasoning can anyone enlighten me please?
Link Building | | RankStealer0 -
Submitting my URL on web/business/service directories
Does it make sense to submit a business URL in as many relevant web/business directories as possible when kicking off a link building campaign? Submitting a free listing is obviously better than nothing, but when does it make sense to pay extra for a premium listing profile on some of these directories? There are just so many and a lot of them appear spammy, even though some of my competitors are getting traffic from them. Any advice on this would be great!
Link Building | | TheSquareFoot1 -
Canonicals Url question
I manage a computer repair company website, www.callnerds.com One of our main marketing strategies are blog articles and press releases to newspappers. Because of this, we have a subfolder for the author of the newspaper articles who is becoming well known, and we wanted a place for people to connect with her personally. on this site callnerds.com/andrea We only publish articles that Andrea writes. Then on the blog we publish all of the articles, including articles that andrea writes, in addition to articles written by everyone else on our staff. i would like suggestions on wether a canonical link on the /andrea site should be used. the canonical link wold point to our blog. Her site is starting to get high quality links from newspapers and magazines, however all of the content on the site is duplicate content of the same article on our blog. Any thoughts?
Link Building | | NerdsOnCall0 -
Are backlinks to a domain that redirects useless?
I am working on trying to get backlinks. We are currently redirecting a few Domains to our current domain name. One of the Domains that is redirecting is the main Domain, we will be advertising in the near future. Can I send backlinks to the redirected URL or does it only carry link juice if it is to the main Domain?
Link Building | | hfranz0 -
Linkbuilding URL Problem
Hi, I work for Perfectly Engraved. A lot of our links point to http://www.perfectlyengraved.co.uk/. However that address forwards to - http://www.perfectlyengraved.co.uk/ecommerce/scripts/default.htm. Should we ensure our links point to http://www.perfectlyengraved.co.uk/ecommerce/scripts/default.htm or does it not make difference? I've put our forwarding code below. <%@ Language=VBScript %> <% Option explicit Response.Buffer = true Response.Redirect "http://www.perfectlyengraved.co.uk/ecommerce/scripts/default.htm" %> Also, would it help if we did a 301 redirect from http://perfectlyengraved.co.uk/ecommerce/scripts/default.htm to http://www.perfectlyengraved.co.uk/ecommerce/scripts/default.htm? As both addresses for every page on our site return the page with or without www Thanks
Link Building | | Aardvark0