Jump to content

Can this be written more efficient?


Moldarin

Recommended Posts

Hi,

Can I somehow write this more efficient? And maybe actually get it working too? :D

[code]RewriteEngine On
RewriteCond %{HTTP_HOST} ^second-domain\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.second-domain\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^thirddomain\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.thirddomain\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.first-domain\.info$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.first-domain\.com$ [NC,OR]
RewriteRule ^(.*)$ http://first-domain.com/$1 [R=301,L][/code]

It works if I drop ",OR" and add a rule under each condition though... But then it runs slow as *!
Link to comment
https://forums.phpfreaks.com/topic/33283-can-this-be-written-more-efficient/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.