0

I want to mask a whole directory and their files in order to show just the main URL

From:

www.domain.com/directoryX/directoryY/index.html or www.domain.com/directoryX/index.php`

To:

www.domain.com

I don't know how to do this with .htaccess, any advice?

Bhavesh Odedra
  • 10,990
  • 12
  • 33
  • 58
Winebous
  • 51
  • 1
  • 4

1 Answers1

0
 <script type='text/javascript'>
      if(history.replaceState) history.replaceState({}, "", "/");
      </script>  

Note : where / is the path u want to show.

it shows the url like mysite.com no matter which link i have clicked. but i have a problem with this code while reloading the page the complete url with query string blink into address bar.

sanoj lawrence
  • 951
  • 5
  • 29
  • 69