I made a staging wordpress site (test environment)- www.staging.example.com alongside the core site -www.example.com. problem is the main site www.example.com is tied to SSL. Hence, I cant get to staging site. The Htaccess inside the main site is mentioned below. It redirects every non-www To www and then http TO https in turn. Can I just add an exception here to my staging site- www.staging.example.com (root dir: public_html/staging/). I also want to allow only my own ip to this staging site so that no one else can have access.
<IfModule mod_rewrite.c>
#First rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Now, rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
I also want to know if I need to put anything in the Htaccess of my staging site (public_html/staging/htaccess)?