I have website like www.example.com
and this page already redirected to www.newdomain.com
, The rediction rule written in somewhere. not in the root directory.
When I enter www.example.com/about-us
its redirected to www.newdomain.com/about-us
and says 404 page not found. I want to redirect all subpages from example.com
to example.com
home page.
I used following code but its not working.
RewriteEngine On
RewriteRule ^parent/(?!index\.php).+)$ /parent/index.php [L,NC]