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
-
Http Redirects to Https - then to Redirect 301
Searched - not seeing this exact issue(sorry if I'm wrong). I'm my report I'm seeing that we have old URLs in the wild using http. Those requests come to our site, and then are redirected to the https version. However if this url does not exist, then there's another redirect 301 to the actual page. This obviously causes a redirect chain. I've searched but don't see a clear answer to this. How can I avoid the chain? How can I go from the http to the new https URL without first incurring the double redirect? "Look for any recurring chains that could be rewritten as a single rule. " FWIW I don't see any http to https rewritecond's in my htaccess, and cannot trace where that redirect is generated from.
Link Building | | qozmiq1 -
Should my URLs with or without a slash? And how to avoid multiple redirects?
Moz, I am noticing that I need to go back and update my outbound links to your site. There are a lot of them because your content is so great and we love you guys. Could you explain your logic for making the change? Example on my Schema Markup Website Audits page: https://moz.com/blog/state-of-searcher-behavior-revealed/ redirected to: https://moz.com/blog/state-of-searcher-behavior-revealed
Link Building | | jessential0 -
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 -
Could google recognize urls in data-attributes?
Hi, could google's crawler recognize the following example as a link and will be crawl the url? any experience? ty for your help
Link Building | | censeo0 -
How to find all banklinks for a URL that forwards to a main URL
I have a client (yea! my second one doing seo) who has a law firm. He has a main site and then another site that just forwarded to his main website. He wants to find all the directories (and other places on the web) where his second site is listed. At the time when he was adding his firm into the directories, he was using his secondary url but now he wants to go back and use his main website. Unfortunately, he doesn't have a log of every place he added himself. I tried just searching Google for "mysecondarywebsite.com" (in quotes)for example but the SERPS return listings that aren't right. Suggestions?
Link Building | | Czubmeister0 -
301 to main page or deeper page for best 'link juice'.
I have two rafting websites. One ranks high for one set of keywords. The other ranks okay for a different set. I want to redirect the whole second site to the first to give the first more link juice and hopefully lift the first site even more in the rankings. Would it be better to link to a deeper page of the 1st site. I have a page that does well for some long tail keywords or would it be better to link to the main page. Or is it a bad idea over all.
Link Building | | tkobrien0 -
Posting "similar" blog posts to multiple blog sites seems "shady", does it work?
I've read a lot of info here in the Q & A tonight and there was a thread that stated it's potentially a good thing to post content on multiple blog platforms such as: blogger.com posterous.com wordpress.com tumblr.com I've also been trying to figure out how to deal with my blog as a subfolder instead of a subdomain. That research in Q & A clearly indicates that Google treats subdomains basically like separate websites and links from my blog to my main website will not be as valuable if i stay the course with my blog on a subdomain short term. Given that, if the 4 blogging tools above all require the use of a subdomain, then how am I actually taking advantage of the seo value of blogger,posterous, tumblr? In my case my domains would be: steripen.blogger.com posterous.tumbler.com steripen.wordpress.com steripen.tumblr.com Just not adding up to being viable given what I read states these would be treated as new websites, not to mention I worry these posts, even slightly differentiated, would be suspect. Who am I truly benefitting by doing this? Users?
Link Building | | Timmmmy0 -
Does the url text count as anchor text in google's algo?
I always try to strive for getting good anchortext in links that people link to my sites with, but sometimes they are not very web savvy, or just plain not willing to format the link the way i want it and we end up with links that use the URL as the anchortext. My question is, if i format a url such that it has keywords in it, and when someone makes a link like this: http://www.storwell.com/self-storage-toronto-bursary-application-form.php does google consider the words: storwell, self, storage, toronto, bursary, application & form as the anchor text?
Link Building | | adriandg0