Solved

how to accept double slashes in apache

Posted on 2009-04-14
4
498 Views
Last Modified: 2013-12-24
Hi,

We have an apache web server which redirects requests to a weblogic server. We are running into problems, when trying to get to resource when using "//" in the URLs.

For example - we have a URL -
https://sue.aoe.com/abcd/calendar//sqaure.gif or
http://sue.aoe.com/abcd/calendar//sqaure.gif

when we try to hit the URL we get an -

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

We are using Apache/2.0.52 (Red Hat) Server

Can you suggest if there is a way, by which we can fix apache to handle this URL. Is there something in httpd.conf file, that we can use?
0
Comment
Question by:LordSM
  • 3
4 Comments
 
LVL 6

Expert Comment

by:James Looney
ID: 24144046
My apache always accepts double slashes as single slashes.

I did a quick google and found this post (http://www.webmasterworld.com/apache/3412891.htm) which states:

apache treats multiple slashes as single slashes.
You can 301 redirect double-slashed URLs to the correct URL using mod_rewrite in .htaccess:

rewriteCond %{REQUEST_URI} ^(.*)//+(.*)$
rewriteRule / http://www.example.com/$1/$2 
 
Either of these snippets will replace two or more contiguous slashes with a single slash.
0
 

Author Comment

by:LordSM
ID: 24144088
can we modify something in httpd.conf file to do the same thing. please let me know. also, where do I modify this .htaccess file, I dont think I have it under the web server directories
0
 

Author Comment

by:LordSM
ID: 24160599
any comments on this question?
0
 

Accepted Solution

by:
LordSM earned 0 total points
ID: 24297965
No reasonable answer provided yet
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Articles on a wide range of technology and professional topics are available on Experts Exchange. These resources are written by members, for members, and can be written about any topic you feel passionate about. Learn how to best write an article t…
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.

777 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