soycharliente Posted January 29, 2010 Share Posted January 29, 2010 Is it possible to redirect all incoming traffic to a domain to one specific file on the domain? I tried: Redirect / /path/to/file.php But then quickly realized that was an infinite loop. Can I do the same concept but have a condition to exclude that file. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/190254-redirect-traffic-from-whole-site-to-specific-folder/ Share on other sites More sharing options...
cags Posted January 30, 2010 Share Posted January 30, 2010 You should be able to achieve this using a simple RewriteCond and RewriteRule... Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !^path/to/file\.php$ RewriteRule ^.+$ path/to/file.php [R] Quote Link to comment https://forums.phpfreaks.com/topic/190254-redirect-traffic-from-whole-site-to-specific-folder/#findComment-1004186 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.