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

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

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -