0

I have the following rewrite in my .htaccess file:

RewriteCond %{HTTP_HOST} ^sub.domain.lc(.*)
RewriteRule $(.*) app.php$1 [NC,L,QSA]

I am using sub.domain.lc to develop on my local machine, but when my site goes live it uses another top level domain: sub.domain.com.

How do I create a RewriteCond that ignores the top level domain? It should rewrite both sub.domain.lc and sub.domain.com to app.php.

Scuba Kay
  • 2,004
  • 3
  • 26
  • 48

1 Answers1

1

You can do it this way

RewriteCond %{HTTP_HOST} ^sub\.domain\.(?:lc|com)$ [NC]
RewriteRule ^(.*)$ /app.php/$1 [NC,L,QSA]
Justin Iurman
  • 18,954
  • 3
  • 35
  • 54