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 -
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 -
Https question
I had a site with an ssl certificate on. It has now been taken off. We are getting 404 errors on the weekly report for pages that were indexed as https What is the best way to get rid of these? How can I take them off the map or do we need to put the ssl back on? Thanks
Reporting & Analytics | | sharpster0 -
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 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 -
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 -
Site: Query Question
Hi All, Question around the site: query you can execute on Google for example. Now I know it has lots of inaccuracies, but I like to keep a high level sight of it over time. I was using it to also try and get a high level view of how many product pages were indexed vs. the total number of pages. What is interesting is when I do a site: query for say www.newark.com I get ~748,000 results returned. When I do a query for www.newark.com "/dp/" I get ~845,000 results returned. Either I am doing something stupid or these numbers are completely backwards? Any thoughts? Thanks, Ben
Reporting & Analytics | | BenRush0