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
-
What Should be the URL of third party blog for my website
Hi All, What Should be the URL of third party blog for my website. Lets say if i have a website xyz.com (which provide pest control services in New York City) and I want to create third party blogs on platforms like blogspot, weebly etc so should i create the blog url as xyz.blogspot.com or i can use a keyword in the blog URL such as pestcontrolnyc.blogspot.com? Which URL would be the best as per Google's guidelines. Note: I have already have a blog within the domain as xyz.com/blog/ and i do weekly posting on this blog. But at the same time i want to create 1-2 third party blogs to get some backlinks from other sources.
Link Building | | Mr.Suren0 -
Backlinks vs multiple domains
Hello, Our main website is setup on a .com domain and a .ca is setup as a 301 Permanent redirection to the .com. We just signed up to Majestic and found that we had a bunch of backlink linking to the .ca instead of the .com. My question is, is the SEO juice (for DA) being passed by from the .ca to the .com or I should start contacting those websites to get the backlink changed to .com? Thanks
Link Building | | GlobeCar0 -
Redirect from a previous url
Hi - newbie question I have a customer who's had previous versions of his website. Previously it was known as "princess-interiors.co.uk" (been around for a few years) and is now "princess-design.co.uk" (been around also for a few years). New site is WordPress - what would be the best way to redirect (I have access to the previous version of the site which is still hosted). I expect it's to use 301, but how would I do that (step by step), and does www. versus non-www need addressing (and how). Really concerned, as this site has gone to zero organic visits!! Hoping somebody can help. Thanks
Link Building | | Gokart0 -
Is it there a diminished benefit from having multiple links from websites hosted on the same server?
Looking to link to a website from other relevant websites. However, these websites are all hosted on the same server. We know that Google looks for diversity when it comes to varying websites in determining link value and authority, however, what about the case of diversity in the case of websites on different servers? Does this even matter? Any insight here would be most appreciated!
Link Building | | Gavo0 -
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 -
Using brand domain for easy verbally said with 301 redirect to exact match.net for a site
I have recently bought an exact match.net for a keyword with no hyphens (on the fence about hyphens, read so many different views on here). From looking around it seems that not all solicited links that I am interested in use anchor text, but more significantly exact match domain would be like automatic anchor text when anyone from the general population posts a link to your site. I sell print books and am thinking of keeping the non-keyword domain in them so they are easy to say and type, while using the exact match domain for everything else online which the non-keyword domain would 301 redirect to. I don't do any programming and will use cPanel on my webhost to do the 301 redirect, I already have one 301 to go to the www subdomain so that would make two 301's. This might sound quite straight forward to many here but it's fairly new to me and I've not seen cPanel mentioned here yet, so was wondering if I am going about it the right way.
Link Building | | Zoolander0 -
Redirecting a previously expired domain - any SEO benefits?
Is there any SEO benefits from registering a previously expired domain name that is still linked to form an authorative source and 301 redirecting it to another site on a similar subject? Obviously first benefit is giving users who are clicking on the link to be sent to a site on a similar subject that just to a dead link.
Link Building | | Wardy0