...

View Full Version : & Symbol in directories?



KyleP
07-06-2011, 10:37 PM
Hey there,

I was given a script and there's about 100+ directories that have the percentage symbol (%) in them. However, it doesn't look like apache let's me view these directories from a browser, however it does allow me to view the ones using $. Anybody know how I can edit the apache configs to allow percentage symbols?

oracleguy
07-06-2011, 10:54 PM
It isn't really a problem with Apache per-se. The percent sign is a special character in URLs which means you need to escape it.

There is a handy table of escape characters on this page: http://www.werockyourweb.com/url-escape-characters

KyleP
07-06-2011, 11:10 PM
I kind-of described it as an escape/urlencoded character but this is what I mean:
http://i55.tinypic.com/2dw82v5.png

They're actually directories in which have been named with a % in them :/

Example:
http://seksimac.com/$external_c/stencil/

I setup the same script on an older server of mine and it works perfect, but I need it to work on this server :/

oracleguy
07-06-2011, 11:57 PM
Was the old server running an older version of Apache?

You might be able to work around the problem using mod_rewrite. If that is what the old server is doing then it would be a simple matter of moving the rules over.

As the link I suggested in my last post indicates you'd need to escape the special character(s).

http://seksimac.com/$external_c/stencil/
would need become:
http://seksimac.com/%24external_c/stencil/

KyleP
07-07-2011, 01:30 AM
Was the old server running an older version of Apache?

You might be able to work around the problem using mod_rewrite. If that is what the old server is doing then it would be a simple matter of moving the rules over.

As the link I suggested in my last post indicates you'd need to escape the special character(s).

http://seksimac.com/$external_c/stencil/
would need become:
http://seksimac.com/%24external_c/stencil/

Thanks for the help! mod_rewrite is already enabled due to cPanel/whm. $external_c is working fine, it displays in the browser, but any folder that has the name %%51 or something along those lines will not display.
If you goto http://matchsingles.org it loads perfect, however at http://seksimac.com it does not. Both are running the same script, same htaccess settings. Both run off cpanel/whm and automatically include mod_rewrite.

I can't seem to find what I'm missing! I've been spending ours on this problem, in-which is probably something simple :/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum