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
-
URL String Tracking Question--Need help!
I am doing some research for a freelance project and found a URL receiving a decent amount of traffic from search with this url string after the normal page url (xxx.com/credit-card-counseling.aspx?match=e&query=debthelper.com&id=22097628847&id=1810807655) Is this some sort of GA tracking code? Why would it be used on that page to track organic search hits if that happens automatically? Would love some help figuring this out! Thanks,
Reporting & Analytics | | RickyShockley0 -
Question about setting up Google Webmaster on Network Solutions?
I'm trying to set myself up as a Webmaster on my company's site. We use Network Solutions. I am following Google's directions on how to do this. However, I am a bit wary. Here are the directions. Underlined is the part I am having trouble with: Log in to your account for howlatthemoon.com at www.networksolutions.com by clicking theManage Account icon. In the left navigation bar, open the nsWebAddress (Domains) menu by clicking the **+ **icon. Click Manage Domain Names. On the Domain Details page for the domain you're using, select the Designated DNS radio button (to the right of Change domain to point to) and click the Apply Changes button. If you've previously modified your advanced DNS settings, click Edit (to the right ofDomain currently points to). Under the Advanced DNS Manager heading, click Manage Advanced DNS Records. Under the Text (TXT Records) heading, click Add/Edit. In the Host field, enter @. Leave the TTL field set to the default value. In the Text field, copy and paste the following unique security token:
Reporting & Analytics | | howlusa
(security token removed for obvious reasons) Click Continue. Review your changes and click Save Changes. When you've done saving the TXT record, click the Verify button below on this page. There is already a host of @ (None). The text for it reads: v=spf1 include:_spf.google.com ~all I called Network Solutions and the guy I was speaking with told me to delete it and replace it with my Google Webmasters code. However, I think this is setting up our email. Do I just add the Webmasters in and have two hosts of @ (None)? Thanks!0 -
Question about cannonical URLs for a site redesign
Hello folks, I've redesigned a site completely and I ended up changing their CMS to wordpress as well. So their URLs which mostly ended in .html and folder organization have been thrown completely out the window with wordpress' '/' format. I'm just wondering what the best way is to approach retaining all the site's previous "link juice". What should I be doing here? How do I make sure their organic rankings don't fall? (They've left their previous SEO firm so they can't help me out on this). Thanks!
Reporting & Analytics | | seonubblet0 -
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 -
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 -
Our SEO is garbage. can someone answer a few questions for me?
I've seen our SEO drop to more or less the bottom of the barrel, and I don't have any answers yet as to why. SEOMoz is running it's crawl currently, and I have a few errors about duplicate titles and content, so I know I have some work cut out for me. But, why the sudden drop? The only change I made at the time was a change to our URL structure, but all links were 301'd to their new location. Does this still hurt SEO that terribly? Also, our robots.txt file is getting indexed and showing up as the first result at times. Very embarrassing. It's doing better than our other pages. 😞 I don't get what's happening here. Yrzu3,fkbYu
Reporting & Analytics | | stagl0 -
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 -
Overall site traffic - 3 quick questions
3 things : 1. Does Google factor in overall site traffic in rankings? So for 2 sites, all other things being pretty much equal, the one with higher traffic will be listed higher? 2. Does this logically imply that sites with lower traffic overall face an uphill struggle to be ranked highly??? 3. As an extension to this, would it be true to say that by increasing site traffic, say with Google Adwords or other online or offiline or whatever advertising, that might help get higher SEO rankings??? Thanks so much for your responses. This forum is great!
Reporting & Analytics | | inhouseninja0