redirect - apache2 vhost redirection -


i have defined differents hosts in windows host file, 1 every project release (rc1, rc2 etc..) create 1 vhost per release can redirect directly subdir, example :

pp15.mv => http://localhost/mv/pp15/.....
pp16.mv => http://localhost/mv/pp16/.....

moreover, need redirect host ppx.mv autologin url, looks /mv_dbname.php?login=testlogin&mdp=202cb962ac59075b964b07152d234b70

so, finally, want type in urlbar :
http://pp15.mv
, redirected to
http://pp15.mv/mv_dbname.php?login=testlogin&mdp=202cb962ac59075b964b07152d234b70

in virtual host file have :

<virtualhost *:80>     servername pp15.mv     documentroot "d:\apache\htdocs\mv\pp15"     <directory "d:\apache\htdocs\mv\pp15">         allowoverride         allow     </directory>     rewriteengine on     rewriterule ^/index.php /myvisitv3_dbname.php?login=johsmi&mdp=202cb962ac59075b964b07152d234b70 [r]     rewriterule ^(/)?$ /myvisitv3_dbname.php?login=johsmi&mdp=202cb962ac59075b964b07152d234b70 [r] </virtualhost> 

the first redirection works great, if try redirect directly host, redirection error (too many redirections occured)

do have idea ?

thank previously.

ok, here did :

<virtualhost *:80>     servername pp16.mv     rewriteengine on     rewritecond %{http_host} ^pp16\.mv$      rewriterule ^(/)?$ /mv/pp16/xxx/xxx_dbname.php?login=johsmi&mdp=202cb962ac59075b964b07152d234b70 [r] </virtualhost> 

no [l] on redirection because app have internal redirection, , no document root because php won't able read $_server['requested_uri'] var correctly, have did (i prefer)

<virtualhost *:80>     servername pp16.mv     documentroot "d:\apache\htdocs\mv\pp16\xxx"     rewriteengine on     rewritecond %{http_host} ^pp16\.mv$      rewriterule ^(/)?$ /xxx_dbname.php?login=johsmi&mdp=202cb962ac59075b964b07152d234b70 [r] </virtualhost> 

but php have misread app path (/ instead of /mv/pp16/xxx/)


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -