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
-
Free Media Site / High Traffic / Low Engagement / Strategies and Questions
Hi, Imagine a site "mediapalooza dot com" where the only thing you do there is view free media. Yet Google Analytics is showing the average view of a media page is about a minute; where the average length of media is 20 - 90 minutes. And imagine that most of this media is "classic" and that it is generally not available elsewhere. Note also that the site ranks terribly in Google, despite having decent Domain Authority (in the high 30's), Page Authority in the mid 40's and a great site and otherwise quite active international user base with page views in the tens of thousands per month. Is it possible that GA is not tracking engagement (time on site) correctly? Even accounting for the imperfect method of GA that measures "next key pressed" as a way to terminate the page as a way to measure time on page, our stats are truly abysmal, in the tenths of a percentage point of time measured when compared with actual time we think the pages are being used. If so, will getting engagement tracking to more accurately measure time on specif pages and site signal Google that this site is actually more important than current ranking indicates? There's lots of discussion about "dwell time" as this relates to ranking, and I'm postulating that if we can show Google that we have extremely good engagement instead of the super low stats that we are reporting now, then we might get a boost in ranking. Am I crazy? Has anyone got any data that proves or disproves this theory? as I write this out, I detect many issues - let's have a discussion on what else might be happening here. We already know that low engagement = low ranking. Will fixing GA to show true engagement have any noticeable impact on ranking? Can't wait to see what the MOZZERS think of this!
Reporting & Analytics | | seo_plus0 -
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 -
Bounce Rate Question - The percent calculated does not add up
Hello All, I'm attempting to see why organic search bounce rate has increased by 5% when compared to last year for a certain section of my website. I am using a custom segment to filter the specific pages I want to look at. Once the custom segment is set, I go to Acquisition - > Channels - > Organic. Then, I click the Landing Pages tab. Because we don't have keyword data anymore the only thing I can look at is the landing pages that contributed to the change in bounce. Finally, I set my date range and compare to the same date range as last year. Once I set the date range I am presented with a list of URLs and the percent change in bounce rate for each URL. This is where I get confused. If you look at the average bounce rate at the top of the column (example 1 attached) it does not add up with the data below it. If you export all of the data to excel, and then do an "Average" function in Excel, the data adds up to 17.29% instead of 35.04% for Sept. 2013. Why does this not add up? Isn't GA calculating the Average? Also, I always notice several URLs with only 1 session per URL. Several of these 1 session URLs have a 100% bounce rate. Since the bounce rate at the top of the column (example1) is a reflection of the average bounce rate, wouldn't these 1 session URLs significantly distort my data? I ultimately just want to see the pages that are contributing to the increased bounce rate when compared to last year. Having a hard time figuring this one out. Thank you all, Dave zMfAGls
Reporting & Analytics | | DaveGuyMan0 -
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 -
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 -
'Search Queries Report' in Webmaster Tools Question
Hi, How much do you use the search queries report in webmaster tools to research current rankings/movements? It does look like a great tool but the data doesn't seem to be spot on. For example a keyword over a week might have flux in position so lets say 6.0 then 9.2 for 3 days then back to 6.0. But I check the serp's for this keyword everyday and didn't see any movement?!?! Is this a good tool for you?
Reporting & Analytics | | activitysuper0 -
Question on regular expression for filters on GA
Hi guys, I am creating profiles on some of the countries sites in my network, and have managed to establish the filter for tracking certain url patterns, for example: ^/japan-english- is tracking all my urls in the Japan site that start by japan-english great! however, it is not tracking the japanese instance of the urls. The pattern for the latter is : www.mysite.org/jp/japan-english I could then modify the filter to track the jp subfolder like this: ^/jp/japan-english- but it will then only track the urls on the /jp/ subfolder does anyone know the regex command for tracking the two url patters as follows: /jp/japan-english- & /japan-english- thanks in advance david
Reporting & Analytics | | BritishCouncil0 -
Question for SEO experts!
I am checking my competition with all the metrics available and I have no clue why we are not coming up higher in ranking on Google. It's been 3 months and we've been bouncing between 9 and 7 position. One competitor just came out of nowhere with almost 600 internal links and few external links and occupied 3rd spot. I've built pretty good portfolio of links with links even coming from Google for crying out loud. My on page optimization is very good, we've even passed W3C with no errors. At least 3 of our competitors above us have less Domain Authority, Page Authority, Back links for external domains, number of external domains, etc... Not sure what is going on. We are not really trying to be the top dog in Google all the time, but it is the principle of a thing. Keyword is Laser Marking. Our domain starts with cms. Don't want to type the whole URL because Google might crawl (maybe a bit of paranoid at this point LOL) Any suggestions?
Reporting & Analytics | | DmitryP0