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
-
Authority redirection - 301
Hello! Could you please help me out with below? For example i have a domain www.domain1.com which has authority of 50... and i set redirect 301 to www.domain2.com will the second domain receive first domains authority and rankings? Thanks in advance!
Link Building | | irakli.chkheidze0 -
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 -
Redirecting broken backlink to my site
Hello guys, I found an expired domain with inbound links from 41 different root domains, almost all of them from relevant sources. I have 2 ideas in my mind: A) I am thinking about buying this expired domain and place a 301 redirect to a post in my blog who talks about a similar subject.Relevance: let's say the content of the expired domain is about "horses wallpapers" and the content of my site is about "horse transport". Not the same, but a post in my blog could talk about "top 10 horse wallpapers". Do you see what I mean? B) Contact all the webmasters with broken links, alert them and expect they are nice and place a nice link to the post in my blog talking about "top 10 horse wallpapers". What do you think? Should I take A or B? Any other idea? I added a picture with the Domain Rank of the broken links 🙂 Thanks a lot !!! Luis V1LZBC3
Link Building | | Yeeply.com0 -
Just bought a PA 22 domain ¿301?
Just bought a domain PA 22 and DA 16 domain related of my niche, here you can see the authority What to do? A) Make a 301 to my money site? B) Make a mini Blo? My website is DA 22 and PA 31, will it benefit my site? thank you :))
Link Building | | mozismoz0 -
Can I make a universal 301 redirect rule for my site?
I.e. I switch shopping carts and every page has the same path/name but now ends in .php instead of .htm.
Link Building | | absoauto0 -
Switching CMS and want to redirect links
Hi guys, I have a site that I run which has been around for a little while. It is actually in phpnuke, it also has a phpbb forum.. The site is so customized that I need to move it to something newer. So I am moving it to Joomla. I created a new domain just to get the joomla site created so I can move it to the main domain. My question is this. How should I go about switching from phpnuke to joomla without losing the links that are going to my site. Also, where can I find the links that are pointing to my site? Thanks for looking.
Link Building | | trumpfinc0 -
Redirect
I have to change few permalinks on wordpress website and I am using yoast seo plugin to redirect the links. My question is should I keep links on the original post or should I delete them. Thank you
Link Building | | VillasDiani0 -
Is having multiple links with the same anchor text on a webpage beneficial?
We heard at a recent SEO conference that having multiple links with the exact same anchor text on a page is not beneficial in any way. Is this true? For example, if the link is in the navigation and it is in the footer does it only get counted once by Google for SEO purposes? Is there no SEO benefit to it?
Link Building | | donationtown0