javascript - I need to hide/remove path from the url -


i'm opening html file javascript index.html.the index.html in folder (index) under root folder. when index.html opens, url becomes www.abc.com/index/

i want remove or hide folder name index url. url should display www.abc.com wherever redirect page. i'm opening index.html using window.open

window.open("/index/","_self");  

for achieving can use .htaccess file uses index directory root directory.

in root directory on www.abc.com create file named .htaccess , paste following code:

rewriteengine on  rewritecond %{request_uri} !^/index/ rewriterule ^(.*)$ /index/$1 [l,r=301] 

now if correctly set up, url should open in popup should www.abc.com or /


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -