redirect - "If" tag in <VIRTUAL_HOST> of httpd.conf file checking HTTP_UESR_AGENT of apache 2.4 not working as expected -


i found out documentation apache 2.3 onwards can use tag in hattpd.conf file.

but when tried following in httpd.conf file, not able required redirection.

part of httpd.conf file follows:

    <virtualhost *:80>        servername localhost:80        serveralias localhost1        <if "%{http_user_agent} == 'iphone'">           rewriteengine on            redirect / http://172.26.50.246:90/        </if>         documentroot "c:/apache24/htdocs"     </virtualhost> 

please me in finding flaw in above sniplet...

i found solution

#-strmatch <if "%{http_user_agent} -strcmatch '*iphone*'">     redirect / http://172.26.50.246:90/ </if> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -