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
-
Slug redirect to existing subdomain?
Hi everyone, I'm Levi, new here and new in the world of SEO so please don't judge if my question is silly. Back on the days when my website was built we tought of having subdomains to help with SEO. We have a couple subdomains set up https://stansted.tonorwich.uk, https://heathrow.tonorwich.uk, https://gatwick.tonorwich.uk, https://luton.tonorwich.uk etc .
Link Building | | Leviiii
We do have some content on these, but from seo perspective creating a slug and redirecting it to the subdomains would be beneficial? Would it make any difference at all, good or bad? Ex. Creating
https://tonorwich.uk/taxi-minibus-tofrom-stansted and redirecting it to https://stansted.tonorwich.uk
Will this help or we better create different content on the slugs? Waiting for your opinions.
Thanks in advance.0 -
Absolute urls
I am redesigning my website with an updated theme.
Link Building | | patmatt
One of the theme plugins takes my url: https://example-site.com/1st-level-page/2nd-level-page/page-content and changes it to https%3A%2F%2Fexample-site.com%21st-level-page%22nd-level-page/page-content%2F Does this effect how a web crawler see's my internal links?
Can this have a negative effect on my SEO?
Should I edit the plugin to force it to render the url exactly as written?0 -
Impact of distribution of backlinks across multiple pages
Community, I would be interested to see if anyone has been seeing any experiments, experience documentation, or other data that would give context around the impact of pointing backlinks not just to your money page / home page but distribute it across pages. When doing competitive research I often run into competition which has lower domain strength and page rank but a link profile that is more spread out across their domain; these competitors often outrank my site despite their individual page properties being weaker. Any reference to existing documented experiments, personal experience or guidance is welcome.
Link Building | | italiansoc0 -
MOZ indicates 404 page and 0 backlinks, after 301 redirect. The best redirect solution?
Dear MOZers, I have one concern i would like to ask you.. My website have valuable backlinks to the most important page which is awesome. But, some of those backlinks is old URL which is 301 redirected to the URL I use today. As far as i know 301 redirects pass page rank, so it should be alright. (?) Link i use today: domain.com/awesome-url/ My backlink: domain.com/old-boring-url/ 301 redirected to domain.com/awesome-url/ What bothers me is that in MOZ report (Link opportunities) MOZ indicates my important URL (domain.com/old-boring-url/) return 404. But, it is not true. It is 301 redirected to domain.com/awesome-url/ and it works! I am worried i am losing important link juice here(!?) Also, my On Page Grader tool for domain.com/awesome-url/ reports 0 backlinks. And that is not true! I know exactly which websites are linking back, only problem is that those website are using old URL (domain.com/old-boring-url/) to link back to my website. Am i doing something wrong? Is there a better way to redirect and save valuable link juice for my page? Thank you very much! PS The URL was changed in March 2015.
Link Building | | Chemometec0 -
Should I ask sites that link to me to update links that redirect?
I have found some links to my site that go through a single 301 redirect to get to my site. Should I contact these websites to ask them to update the link, or is that not worth the time?
Link Building | | RCF0 -
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 -
Link from or 301 Domains?
I have 3 domains that are in the same niche as my main site and not connected in any way. Now my question is should I just link to my main site from each of them on a page that is relevant to my main Keywords or should I 301 them to the site? I am thinking that building a link to my main site would have more effect than 301's. Thanks in advance!
Link Building | | JerrodDavid0 -
Retain keywords with redirect
I manage a site the sells product A and product B (both major keywords for us). If I buy the url www.productB.com and redirect it to the original website, would the original website gain any benefits in search engines? Would the benefits of having a url with the keyword be lessened because there isn't content hosted there, only a redirect to the original site?
Link Building | | livethesource0