php - Apache htaccess rewrite condition to root folder on server -


i need create rewrite condition route different folder on server.

something http://mydomain.com/newapp/(.*)$

should rewrite /var/www/mynewapp/index.php/$1

i can't life of me figure out how write conditions, no matter stays in current app....

rewriteengine on rewriterule ^newapp/(.*)$ /var/www/mynewapp/index.php/$1 [l,qsa] 

that's i've tried said keeps redirecting original app.

if /var/www/mynewapp/index.php not within original documentroot (which seems case), symlink /var/www/myoldapp/newindex.php /var/www/mynewapp/index.php , use like

rewritecond %{request_uri} ^newapp rewriterule ^newapp/(.*)$ newindex.php [l] 

to redirect requests.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -