-1

1) Is it possible with .htaccess to rewrite all of your URLs to just http://example.com?

E.g.:

  • http://example.com/folder/subfolder/file.php -> http://example.com
  • http://example.com/index.php -> http://example.com
  • http://example.com/folder/file.php?foo=bar&baz=qux -> http://example.com

2) If it is possible, how would this effect SEO and page rankings?

Zistoloen
  • 879
  • 14
  • 29
celeriko
  • 1,564
  • 1
  • 13
  • 26
  • Note that users typically find this very annoying, as they are redirected to a new website with no hint as to how to find the information they were originally looking for. – Flight Odyssey Nov 22 '13 at 21:30

1 Answers1

0
  1. Yes possible, try this rule:

    RewriteEngine On
    RewriteRule . /? [L,R=302]
    
  2. Since rule is not using 301 SEO may not be impacted.

anubhava
  • 761,203
  • 64
  • 569
  • 643