apache - .htaccess how to substitute urls -


how can substitute urls of web application in sub folder installed on root.

e.g. need map example.com/index.php example.com/new/index.php

i not want redirection url rewrite exempt folder name.

help me learn , define rules.

you can use following rule rewrite request that’s url path (without path prefix) not start new/:

rewritecond $1 !^new/ rewriterule ^(.*)$ new/$1 

this work in .htaccess files other in document root directory.

but want use rule in .htaccess file in document root directory, use request_uri:

rewriterule !^new/ new%{request_uri} 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -