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
-
One or multiple backlinks from business profiles?
Hi, When building diverse backlinks to a website it's often possible to place one, or several, links in the business profile on a directory or social platform such as https://www.broadjam.com/Scambler, https://coub.com/scamblermusic, https://issuu.com/scamblermusic or https://soundcloud.com/scambler. Typically I would only add one backlink to these profiles (and that would be to the home page) but I often wonder if I should take the opportunity to add several links to internal pages and blog posts. Am I missing an opportunity to add more backlinks and spread out the link juice, or could multiple backlinks within short profiles be considered spammy? Any advice would be helpful. Thanks.
Link Building | | JCN-SBWD1 -
Is it worth getting a backlink to a page that will be 301'd?
I have an opportunity to get high value backlinks (from the Emmy's) to a landing page before our new website is live. The backlinks won't be free and they would go live before the website is live. Is it worth spending the money if the landing page will be redirected once the site goes live?
Link Building | | TimThiel0 -
HOW DOES A CANONICAL INFLUENCE OR IMPACT ON A URL WITH BACKLINKS?
I have url A with a canonical to URL B. How is the behavior of the backlinks profile on url A? If some put a backlink to url A count as a backlink for url B?
Link Building | | Linio0 -
Backlinks to an anchor name URL: How Google sees them
I have been searching for the answer to this question and to my surprise have yet to find anything on the web. This is my situation: I have a form at the bottom of one of my pages and have another website that wants to link to this page, more specifically this form. I have an anchor link on the page to this form already. I was planning on sending the anchor name URL to the Webmaster to link to my page so their users will go straight to my form. My question is: do I lose link juice to my URL from this link because it is an anchor name URL? Does Google see this link that goes to a specific portion of my page to be less valuable than if I just linked to the plain URL? Cheers Sean
Link Building | | Tyler1232 -
Ranking Multiple Domains Simultaneously
What kind of strategy would one implement to rank multiple domains in SERPs? (One domain per keyword) I am looking more into link blocking and that, but I don't know the effectiveness and consistency of the strategy. Does anyone have any recommendations? I really can't be arsed giving every single site it's own full SEO treatment 🙂 Thanks very kindly and in advance for your thoughts 🙂
Link Building | | Ultra_Valves0 -
Buying keyword urls for local traffic
Hi, I've been told that there is a real benefit in buying up local domain names and setting up mini adverts to your core website... is this actually true? Seems a strange practice. Example: If I had a car cleaning site called 'MozCarCleaning.co.uk' and the company was based in London. Then I'd buy related domains, 'LondonCarCleaning.co.uk' , 'CarValetLondon.co.uk' and make mini websites which then link to the main site. Alternatively, would it be worth just 301 redirecting directly to the core site? Thanks.
Link Building | | MatthewJamesRiley0 -
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 -
How to build links for a domain name that is redirected to another url?
I'm helping a friend build links to his site because he recently moved across country. His primary domain isn't very SEO friendly (shef1.com) so he registered another domain (stephenshefrinphotography.com). Shef1.com has been around for awhile and has at least been crawled with a page rank of 1 so we decided to keep shef1.com as the main website and redirect stephenshefrinphotography.com to it. So for SEO sake I know it's best to at least have a keyword in your URL so I have been using the url stephenshefrinphotography.com in my link building efforts for local directories and blog comments. Is this the right way to go about this or should I be using the main url shef1.com? He had virtually no backlinks until I started helping him but the ones I have created over the last month are not showing up on the link analysis in my campaigns. I just want to make sure my efforts aren't in vain. Advice please. Thanks!
Link Building | | mrsmelmitch0