mod_rewrite douple encoding url

Posted on 2009-04-26
Last Modified: 2012-05-06
Hey everyone.  I'm have a problem with double encoding of a URL and I can't seem to figure out exactly how to encode the URL again.  

I have just started using mod_rewrite and the page that gets displayed with the abolute URL, is the exact same as that that gets displayed with the mod_rewrite expected.  However on the page I have a href link to another url, and when a user clicks it, I think mod_rewrite is decoding the url twice.

On one server it isn't douple encoding the url, but on other other it is.  I can't find a difference in configuration does anyone know is this is a configuration issue?
Question by:vandepol
    LVL 1

    Expert Comment

    i suggest posting your mod_rewrite code

    Accepted Solution

    Here is the mod_rewrite code.  

    Also there is a popup who's url is generated that is the culpret of the encoded url.

    Thanks for taking a look
    ReWriteRule ^/freeplay$ /paasBVA/bva/listpublicfreegames.action?submit.x=0&public=true [L,PT]
    			<td width="33%">
    			<span class="orangeText"><bean:message key="" /></span><br />
    			<x:forEach select="$availablegamesoneline">			    
    				<c:set var="skinname"><x:out select="@skinname"/></c:set>										
    				<c:set var="configId"><x:out select="@id"/></c:set>
    				<c:set var="flashFileName"><x:out select="@flashfilename"/></c:set>
    				<c:set var="skinswf"><x:out select="@skinswf"/></c:set>
    				<jsp:include page="freeGameSubmitForm.jsp">
    					<jsp:param name="userId" value="${freeGameLaunchForm.userId}"/>
    					<jsp:param name="userNum" value="${freeGameLaunchForm.userNum}"/>
    				<c:set var="skinalias"><x:out select="@skinalias"/></c:set>						   
    				<div class="gameImg">
    					<a href="javascript:void(0)" onmouseover="javascript:window.status='<bean:message key=""/> <bean:message key="${skinalias}"/>'; return true;" onmouseout="javascript:window.status=''; return true;" onclick="javascript:openWindow(urlencode(document.SL<x:out select='@id'/>),'pop${site.siteId}SL<x:out select='@id'/>','760','570','yes');" title="<bean:message key=""/> <bean:message key="${skinalias}"/>"><img style="border:0;" src="${imagepath}/${fn:toLowerCase(skinname)}.gif" alt="<x:out select='@skindescription'/>" title="<bean:message key=""/> <bean:message key="${skinalias}"/>"/>&nbsp;<bean:message key="${skinalias}"/></a>
    				<%--<a href="javascript:void(0)" onmouseover="javascript:window.status='<bean:message key=""/> <bean:message key="${skinalias}"/>'; return true;" onmouseout="javascript:window.status=''; return true;" class="coins" onclick="javascript:openWindow(document.SL<x:out select='@id'/>,'pop${site.siteId}SL<x:out select='@id'/>','760','570','yes');" title="<bean:message key=""/> <bean:message key="${skinalias}"/>"><bean:message key=""/></a><br />					--%>

    Open in new window

    LVL 2

    Assisted Solution

    Try changing the RewriteRule line to this:

    ReWriteRule ^/freeplay$ /paasBVA/bva/listpublicfreegames.action?submit.x=0&public=true [L,NE,PT]

    Open in new window


    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
    If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now