Reg Ex Question about Rewrite Rules
-
In this redirect rule, what does the "$1" mean?
RewriteCond %{HTTP_HOST} ^(oldsiteaustin|www.oldsiteaustin) [NC] RewriteRule ^(.*)$ http://austin.newsite.com/$1 [R=301,L]
-
I'll second that - Stackoverflow is an excellent resource for this sort of thing.
-
If you're looking to understand regex then you could read the SEOmoz post from a couple of days ago - http://www.seomoz.org/blog/an-seos-guide-to-regex - or this tutorial site is okay (if dry) -http://www.regular-expressions.info/tutorial.html
Hang out around stackoverflow as well for specific questions.
-
Aye, so, www.oldsiteaustin.com/page.html will become austin.newsite.com/page.html
-
I believe the (.*) captures the path of the original domain and $1 uses that path in constructing your redirect url. I'm replying without checking my trusty htaccess cheat sheet but this should ensure that you redirect all paths on the old domain to their new equivalent on your new domain.
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
-
UTM tracking on a mapped subdomain, is it OK? (DA bonus question)
Hi, This is a technical question. OK, two technical questions. Please bear with me and I'll do my best to explain... We have a WordPress blog (business account, hosted by WordPress). We use it to blog and send traffic to our separate e-commerce site. We use UTM tracking to see which blog posts perform best. Our e-commerce site has a high domain authority. Our blog, not so much. In an effort to increase the domain authority of the blog we have mapped a subdomain of the e-commerce site to the Wordpress blog (still hosted by WordPress). Q1. Will this actually raise the blog's DA? If the blog does get a DA boost, I guess it'll be because Google now sees it as part of a powerful domain. But if it is technically part of the powerful domain... Q2. Should we remove the UTM parameters from the blog? I've read that you should never use UTM on internal links because it messes with your Google Analytics data. But I'm unsure if links on a mapped subdomain count as 'internal links'. Any help would be gratefully appreciated. Thanks in advance. J
Reporting & Analytics | | JabeKay0 -
Hi - I have a beginner question about organic search results dropping to zero
Really confused about a site I'm getting going on SEO with... I'm new to SEO, but I've found that the organic search results for princessdesign.co.uk have dropped to zero dramatically. I'm concerned that I've missed something and hope that somebody out there might be able to help? Any input greatly appreciated 🙂
Reporting & Analytics | | Gokart0 -
What Parameters and Rules i set to track all types of click?
Hello Expert, If i want to track all types of clicks either link, button, drop down etc for my website then what parameters i add in "Event Tracking parameters" and what will be firing rules. I already have universal analytic and google tag manager. Track Type as even i selected in google tag manager now please tell me 1) what i add in category, Action, label? 2) what should be the rule. I will be really thankful to you if you give cut to cut answer instead of sharing post.
Reporting & Analytics | | bkmitesh0 -
Google analytics question
Ok so in my traffic sources break down I have 3 sections: direct, organic, and referral. My question is under the referral tab I have recently noticed a new traffic source, my own website.... How is this possible? My top referring site is my own website.... Is this considered direct traffic or how is this being traced?
Reporting & Analytics | | jameswalkerson0 -
2 questions on avoiding issues with Google and while being right in it.
Hi SEOmoz community In fact I have two questions I would like to ask (with future SEO in mind). Do you consider a WordPress Multisite or various Single installs 'safer' for SEO? Theoretically, having various sites packed into one Multisite network seems like an ideal solution. However, is there a chance that once a site in the network encounters a little 'negative turbulence', that your other sites in the network might get impacted too due to the cross-referencing, linked account i.e. Webmaster Tools etc.? It would seem outrageous, but then again I wouldn't rule it out. Do I even have to go as far as setting up new Gmail, Google Analytics and Webmaster Tools accounts, so they (the sites) are technically not linked? You can see, I don't trust search engines one bit... Is there still a point posting articles once Google is having a hissy fit with your site? Basically I am currently going through a 'rankings and traffic drops storm'. It's not as bad as being de-indexed, but it's still having enough of an impact. In addition, Google does not seem to treat my new articles (unique content) with the same attention anymore i.e. does not seem to index them 'fully' or not at all (i.e. posting the headline in Google should return the article, but it doesn't). Is there even a point spending time now and posting new material or may it pick it up again once I am through this low phase? Does Google still index what it considers worth or is it a waste of time right now to keep posting, posting and posting more? Thanks for your help. I really appreciate it.
Reporting & Analytics | | Hermski0 -
Setting up Webmaster Tools correctly - naked domain DNS error and sub-domains question
I'm trying to get our domain (verdantly.com) set up correctly in Google Webmaster Tools. Currently, I have three "sites" setup: blog.verdantly.com (wordpress.com blog redirected to this subdomain) www.verdantly.com verdantly.com The subdomain blog and www show up without errors. However, the naked domain shows a DNS error. I've checked the DNS settings at the registrar and don't see any issues. So here are my questions: 1. Am I correct in setting up the naked domain AND the subdomains separately in Webmaster tools? 2. How do I track down / resolve the source of the DNS errors at the naked domain? Thanks!
Reporting & Analytics | | letsdothis0 -
Conversion Rate Question: Should I Measure Visits or Unique Visits?
When you measure conversion rates, is the equation: conversion rate = visits/conversions or conversion rate = unique visits/conversions I ask because it can actually make a pretty big difference in the conversion rate. For example, if you visit my ecommerce website 100 times before buying something (and assuming you're my only visitor), then my conversion rate is 100% _if I'm determining conversion rates by unique visits/conversions. _However, it's only 1% _if I'm determining conversion rates by visits/conversions. _Wow! Now this is clearly an extreme example, but it should serve to illustrate the point that in more reasonable cases, the way the data is measured can have a potentially significant impact on the conversion rate. Is there an industry standard for this? Am I missing something really basic? Also, here's a little bit of context for the question: I run an ecommerce website powered by the Magento CMS and I'm trying to measure my conversion rate in Google Analytics for individual products. Google Analytics shows me my site wide conversion rate, but apparently I have to do some customization in order to measure conversion rates on the product level. That's fine, but I want to make sure I'm measuring my product conversions in a standard way. Thanks for any and all help! Adam
Reporting & Analytics | | Adam-Perlman0 -
Question on correctly using rel="canonical
OK I have a question for the community here. All links below are just used as examples and no relationship or real campaigns are being used with any websites named below. Lets say that my domain is abc.com/whiskey/jack-daniels-whiskey/Gentleman-Jack/ but for Google Analytics tracking purposes I gave another website a tracking link for a banner that is as follows http://abc.com/whiskey/jack-daniels-whiskey/Gentleman-Jack/?utm_source=jackdanials&utm_medium=banner&utm_content=Gentleman-Jack&utm_campaign=holiday%2Bpromotion Since the original URL to my site is http://abc.com/whiskey/jack-daniels-whiskey/Gentleman-Jack and Google will then spider the other site picking up my tracking link within the banner which also contains my original URL, can it cause issues with duplicate content and if so what is the best way to use rel="canonical in this case or would you handle this issue in a different way? Thanks in advance for all your help.
Reporting & Analytics | | DRTBA0