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
-
Regular Expression Question
We are having a little trouble coming up with a goal that shows how many product pageviews we are getting but I need to exclude search results pageviews that (unfortunately) have the same URL structure. Because it's an outside CMS, we have not ability to change the URL architecture. Products are on these types of pages: https://porscheasheville.com/inventory/Porsche+Boxster+Asheville+North+Carolina+2016+Rhodium+Silver+Metallic+536911 https://porscheasheville.com/inventory/Audi+A4+2.0T+Premium+Plus+Asheville+North+Carolina+2015+Gray+638379 Search results pages have this URL structure: https://porscheasheville.com/inventory/new/ https://porscheasheville.com/inventory/?condition=new&make=Porsche&model=Boxster https://porscheasheville.com/inventory/used/ https://porscheasheville.com/inventory/?condition=used&model=A4+2.0T+Premium+Plus I am hoping to create a GA goal with regular expressions showing only the product pages and not allowing the search results pages show up. Here's what I have, it's not working - any regex experts out there who can help? /inventory/[new/][used/] Thanks as always MOZ friends!
Reporting & Analytics | | ReunionMarketing0 -
A couple of [daft] analytics questions
Hello Mozzers, I have a couple of anaytics questions I wanted to ask. What does 'Not Set' refer to? I assume it is when the user has switched off cookies, but was wondering if this is correct or if there were other circumstances that would trigger this? When I look at my reverse goal paths, the same page is in path 1, 2 and 3... Are the pages refreshing? Thanks! Amelia
Reporting & Analytics | | CommT0 -
Question about a Old Domain
My question is about a previously used Domain. recently one of my client buy a new domain and now start working with that. he ask me to manage google webmaster and analysis. Yesterday i found its showing 360 Not found error. and showing some link which is not generated by my client, maybe previously this domain was used and these link are generated at that time. in webmaster tools i use Remove URLs to remove these links from google. My question to experts: it will effect my clients site? can i overcome from this situation? or better to use a new domain? at opensiteexplorer its showing Domain authority is 6/100, Page authority 16/100
Reporting & Analytics | | Tahrim0 -
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 -
So many questions!
Yesterday was a jubilant day! Our website http://www.farnorthkennel.com hit the #2 spot on google for one of our keyword searches "german shepherd puppies in Alaska." We are new at this and it took a lot of work and about 2 months to do this (I realize this is fast). What happened overnight? We have new pages on page 1 towards the bottom, but our homepage fell to around page 4? What would make this happen? I didn't make any updates to the homepage recently. Am I linking to it too much interally? Am I running too many categories? The "too many on pages links" warning comes up all of the time, but I feel like my site is structured user friendly. I am blogging like mad and successfully getting guest blog posts on reputable sites like mad. I have 30,000 Facebook fans.... but will never understand google. Any takers? What happened overnight?
Reporting & Analytics | | Joshlaska0 -
Weird Analytics Question
Looking at a Google Analytics report for a client - Traffic Sources - Referrals - Landing Pages from one particular referrer. This one referral site is a large trade directory that links onto several deep pages of the site, but also links onto the homepage. Analytics is showing the one landing page as //index.html. That's 2 // - not one. If you click on the link, it's a 404. I've never seen this in Analytics before. I'm looking at the client's info on this trade directory site and I can't see a link that points to this 404. The majority of incoming traffic from this site is apparently coming to this //index.html page, so you'd think it would be coming from their main profile on the site. But it's not there. Also, if you had all this referral traffic coming to a 404, you'd expect a really high bounce rate, but it's not - it's average. The client also has a sister site also listed in this directory, and I'm not seeing this same issue in their Analytics. Is this just some weird glitch in Analytics?
Reporting & Analytics | | stevefidelity0 -
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 -
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