/ Published in: Apache

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
RewriteEngine On RewriteBase / RewriteRule ^images/.*$ - [L] # serve only static images # redirect dev request from external IPs to production site RewriteCond %{SERVER_NAME} ^dev.example.com$ RewriteCond %{REMOTE_ADDR} !^127.0.0.1$ RewriteRule (.*) http://www.example.com/$1 [R=302,L] RewriteCond %{REQUEST_URI} !/css/ # do not apply this rule to /css/ folder RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ /index.php [QSA,L] # not found requests redirect to index.php
Comments
