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
-
Should backlink URLs include www, https, or both???
My business is located at remotebaba.com, and I am wanting several sites to link to it.
Link Building | | udaipabla
I am only interested in home page at this point, and we are using HTTPS for our site. Which one of these should I have other sites link to (Please provide complete justification):
remotebaba.com (my root domain)
www.remotebaba.com
https://remotebaba.com
https://www.remotebaba.com I really appreciate your help!1 -
'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 -
GWT Lists URLs with links to my site, but those URLs don't have links to my site
There are a number of URLs that show up for my website in Webmaster Tools as having links to my site when in fact they don't. I know this to be a fact because I actually wrote some of the sites that Google is saying are linking to my site and I know there isn't any links on the specific pages to that site. For example, the site in question is: https://www.liftproducts.com/ As an example, Google is saying that about 100 URLs from https://www.lift-tables.net/ are linking to it when, I'm fairly confident that there is only 1 link to it found here: https://www.lift-tables.net/info.php?countrytabs=3 Yet Google says links exist on this (and many more) page: https://www.lift-tables.net/liftproducts/max-lift/lpt4w-030-48.php I thought at first it might have been due to linking to a image file directly instead of locally hosting it, but after checking the source, that's not the case. I am also seeing this type of non-linking being reported on sites I have no clue what they are. For example, some Spanish site about tandem bicycles is being listed as linking to liftproducts.com: http://206-225-85-34.dedicated.abac.net/tandem/inc Yet I can find no evidence of an actual link existing. Am I missing something here? Any insight of why this is happening and how I can clean up my link signature would be appreciated.
Link Building | | Nivik231 -
I am switching shopping cart providers, and I cannot keep the same URL's we've had for the past 10+ years.
This applies to our product and category pages. What is the best way to limit the impact of this?
Link Building | | absoauto0 -
Changing permalinks, 301 nightmare
I would like to change some of permalinks on our website. I have created new posts with new permalinks and the old ones I have redirect by using yoast seo plugin. Today I have opened a category and I have realized that there are of course the post with new permalinks, but also the old once! What should I do with the old posts?
Link Building | | VillasDiani0 -
Multiple Sites Vs. Single Site
We're a growing law firm looking into expanding into different practices of law. The question we're running into is should we create new sites for our different practice areas or add them to our current site? If we create multiple sites we have to divide our linking building efforts, but if we maintain everything under a single domain will be harder to be considered an "expert" on each section of law and get ranked well in each category? Any insight would be greatly appreciated.
Link Building | | PewLaw0 -
Changing url from non www to www.
basically I have realised i have more page authority and links going to www.onestopmuscle.co.uk instead of onestopmuscle.co.uk. I use wordpress and have no clue how to make sure onestopmuscle.co.uk redirects to www. version. anyone have any ideas? I don't want to mess about with files or i'll most likely make the blog into a disaster.
Link Building | | FLEAR0 -
What is the best company to use when building links to feature on multiple directories online?
I am looking to build links for my clients who are in a very competitive industry 'airport parking', can you advise where I can submit their URL to generate good quality links without being penalised?
Link Building | | shami0