Reputation: 22040
I am doing a rewrite for url www.DomainName.com/x. If any user types in
it must go to exit.php, where "x" can be anything.
My Code is
RewriteEngine on
RewriteRule /$ exit.php
RwriteRule $ exit.php
How do I write the rewrite code for it to go to exit.php and when DomainName.com is typed it should go to DomainName.com not exit.php
Thanks Jean
Upvotes: 0
Views: 347
Reputation: 1582
RewriteEngine on
RewriteRule ^(|start\.php)$ start.php [L] #Contains the filename you want to redirect when calling www.domain.tld/
RewriteRule .+ exit.php [L]
Upvotes: 2