Forum Moderators: phranque
Is there a way to redirect only queries for root index? IE www.example.com. And redirect it to www.example1.com.
If someone goes to www.example.com/1 it should still process through original domain. I'm doing this for a url shortening service. I want the shortened urls to redirect properly and script to still work. But for any root index requests, I would like forwarded to main domain.
I tried:
RewriteRule ^index\.htm$ http://example.com/index.php [R=301,L]
It doesn't even error out, just goes to current blank index page.
So, you can change it to either
RewriteRule ^$ http://example.com/index.php [R=301,L]
RewriteRule ^(index\.htm)?$ http://example.com/index.php [R=301,L]
Also, be aware that this is an extrernal redirect, and that search engines will likely 'update' their search results to show your "home page" as "index.php" in the search results. Is that really what you want?
Jim
So now when I goto [example1.com...] it does redirect me to example2. But if I goto just [example1.com...] it shows blank page.
I really appreciate all of the help Jim.
Jim
Redirects seen to work without issue, and I can access to make new directs. If you try to access root, you get redirected to correct domain.
You're a genius! I was a paying member for awhile, but dropped out due to not being active webmaster. Will look into reactivating my membership. Can't say thanks enough Jim!