Forum Moderators: phranque
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html
Rewriterule ^index\.html$_ [abc.com...] [R=301,L]
already
and i need one more rules so that
abc.com/<anything> redirects back to abc.com
somehow I m going in loops with any of the rules I tried.
Thanks.
Please explain what you are trying to accomplish by redirecting *all* to "/". Be aware that this means that all requests for images, css files, external JavaScript files, robots.txt, SiteMap.xml, etc. will all be redirected to the same URL. In most cases, that would be a very, very bad idea.
[added]
Also note that with your existing code, your two rules are in the wrong order -- Put the most specific external redirect rules first, followed by the least-specific, then the most-specific internal rewrite rules, again in order from most to least specific.
This avoids problems with multiple redirects (e.g. on a "doubly-wrong" request for example.com/index.html), and avoids having your external redirects expose internally-rewritten filepaths as URLs to the client.
[/added]
Jim
I needed this for testing.it wont be exposed to search engine.
This is what solved my problem
RewriteRule ^(.*)$ [abc.com...]
Thanks for your comments :)