.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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -