Basically, I would like to emulate what Hypem.com does with their URLs, if you go to hypem.com/popular you will get redirected to hypem.com/#/popular
How to do this using htaccess? I have several basic URLs that I need to redirect, all the rest remain the same, for example, these two need to be redirected:
/news
/contact
But /admin should not
/admin
This code worked for me:
## REWRITE RULES # enable rewrite RewriteEngine On RewriteBase / RewriteRule ^(news|contact)(/?)(.*)$ #/$1$2$3 [R,NC,NE,L]
It seems to me that they do this using javascript:
url = document.location.pathname + document.location.search; url = url.replace(/\?ax=1/,''); url = "/#" + url; top.location = url;
This is from http://hypem.com/popular
Source: https://habr.com/ru/post/1332231/More articles:how to iterate (loop) through directories in phing? - phingDrawing a solid sphere with transparency in openGL - c ++Building a curve curve in a python database - pythonWhy is Visual Studio 2010 ignoring my link right after build? - visual-studioauto-generated smart pointer - c ++Javascript switch statement - very simple, what am I doing wrong? - javascripthow to get the previous element with jquery each () - javascriptFolder selection in Ant - javavim: pass a char or word to your function - vimSleep in a loop time gets its pid - linuxAll Articles