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
-
Backlink Help - Contact Site Owners or 301 Redirect?
Hi, I am performing some backlink updates for a client and would like to know if I can speed the process up. Currently I am contact site owners and asking them to update the links that appear on their website of my clients. As this is tedious work, can I just setup 301 redirects for these products instead of contacting site owners and asking them to change the URL? Is there any benefit to having the proper URL on other websites? Thanks in advance!
Link Building | | KarenNelson0 -
'spammy' domains redirecting to website
Hi Everyone, I hope that someone will be able to help us with this one as we have trawled the internet looking for a solution! We have multiple domains (.com/.co.uk/.net versions) which all point to the one website, however, some of these domains have a high spam score - 9-11. Our first initial reaction would be to remove the auto redirects, but, the other domains have been a source of conversion in previous months (or so analytics tells us). So what I'm wondering, is do we remove the 'spammy' links from redirecting to our site, or do we leave them there? We certainly don't want to risk a penalty. Thanks for reading!
Link Building | | hydra_creative0 -
Adding keyword to your url
Couldn't find the answer to my question anywhere so I'll give it a try here. If you have a site called www.example.com, and then want to add a keyword to this site, like this: www.example.com/keyword How do you add a keyword to your url like this? Without making the URL with the keyword your "main" URL, meaning you don't have to enter the keyworded URL to get to the homepage (www.example.com), and still rank better on the keyword put in the url. I'm a bit confused on the subject, would love for someone to help me understand! Thanks.
Link Building | | danielpett0 -
How does Google treat multiple backlinks on the same page?
Hello mozCrew Just a quick yay or nay. We have an embeddable code on our site for customers who want to post our link on their website listed here: http://www.accupos.com/etc/embed-code-restaurants.php But in our link, there are actually 2 separate links, one branding link that says the name of our company, AccuPOS, and another link which targets a specific target keyword "Restaurant POS Software". My question is, does Google only give credit for the branding link, since it is listed FIRST? Or will we get double credit? Is this a good or bad practice, and what would you recommend? Thank you! Derek Moore
Link Building | | DerekM880 -
Multiple links to dead pages
I have just taken over a client and have been shocked to see a lot of wasted 'link juice' from hundreds of websites linking to old/dead pages within my client's domain. My question is - what is the best method to re-capture that juice given that it is impractical to change the links at source. Thanks.
Link Building | | driansmith0 -
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 -
Multiple same domain links on Open Site Explorer
In doing competitor link analysis on Open Site Explorer, I've noticed quite a few links coming from the same domain listed separately. This seems to be especially prevalent with Google directory listings. For example, I'll see a link to the site from google.hu/...., google.am/..., google.kz/..., etc. In some cases, it will be prefixed with an IP address, followed by the subfolder address. Correct me if I am wrong, but these seem to be all counting as separate root domains that are linking to the site. How is this done? Are directory submissions given to each country's google directory? Does an original DMoz listing get re-submitted to all of these? Just looking for some clarification on this and how it's accomplished. Thanks everyone!
Link Building | | NiallTom0 -
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