.htaccess - Rewrite url in htaccess file -


hello know if possible rewrite this:

  • www.example.com/view/page.html

(where view directory)

to:

  • www.example.com/page.html

by using rule inside htaccess file located in directory called "view".

you can create .htaccess file on root folder , write code below on it:

rewriteengine on rewriterule ^page.html$ /view/page.html [nc,l] 

you should able access www.example.com/page.html , see page.html page without restarting apache.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -