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.
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
-
GA 4 Question
What differences are you typically seeing in Google Analytics 4 compared to UA? For one site I have, UA says there were 2,342 new users. GA4 says there were 1,899 new users for the same time period. Does that seem like a normal amount of difference between the two platforms?
Reporting & Analytics | | emilycarimus1 -
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 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 -
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 -
An initial set up question - linking to GA
when viewing campaign it indicates there is a problem linking to our GA account but the details entered are correct. Any ideas what the problem might be - nothing on the campaign settings page gives me a clue. There is a highlighted box saying disconnect from GA but nothing else. The only thing i can think of is that the GA account was set up by a third party and we have access to view it - could it be a permissions problem?
Reporting & Analytics | | GreatGifts4Kids0 -
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