Solved

how to accept double slashes in apache

Posted on 2009-04-14
4
491 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Phishing is at the top of most security top 10 efforts you should be pursuing in 2016 and beyond. If you don't have phishing incorporated into your Security Awareness Program yet, now is the time. Phishers, and the scams they use, are only going to …
If you want to move up through the ranks in your technology career, talent and hard work are the bare necessities. But they aren’t enough to make you stand out. Expanding your skills, actively promoting your accomplishments and using promotion st…
The Bounty Board allows you to request an article or video on any technical topic, or fulfill a bounty request to earn points. Watch this video to learn how to use the Bounty Board to get the content you want, earn points, and browse submitted bount…
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.

747 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

14 Experts available now in Live!

Get 1:1 Help Now