View Single Post
  #18  
Old 03-16-2015, 11:17 AM
  bigredseo's Avatar 
bigredseo bigredseo is offline
 

X-Man
  
Join Date: Oct 2002
Location: Omaha, NE, USA
Posts: 2,364
 

Default Re: April 21st - Mobile-Friendly Sites To Rank Better In Mobile Search on Google

Taking the example from post #12, you can add the following;

Code:
RewriteCond %{HTTP_HOST} !^subdomain\.domain\.com RewriteCond %{SERVER_PORT} !^443 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Basically, this is saying "rewrite on the conditition" that the url "is not" subdomain.domain.com

The "!^subdomain" is the "is not subdomain" part.

Give that a shot and you should be set.
__________________
Conor Treacy - Big Red SEO - @bigredseo
Search Engine Optimization & Internet Marketing - We Bring Your Website Out Of Hiding!
If you can't be found on Google, Bing or Yahoo, you pretty much don't exist on the Internet.
Omaha SEO Office with National & Local SEO Services
Hourly Consulting - great for SEO Disaster Recovery, Audits and DIY Guidance
Reply With Quote