logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Access Forbidden if url contains special characters
Author
holian



Joined: 03 Jun 2013
Posts: 5
Location: Hungary

PostPosted: Mon 03 Jun '13 15:37    Post subject: Access Forbidden if url contains special characters Reply with quote

Hello Masters,

We have many intranet document what linked on our intranet site. We use "apache builed in" directory listing to handle documents on browser, and make accessable to users. Because this not so user friendly we try to use a template (h5ai- http://larsjung.de/h5ai/) for mod_autoindex.

Unfortunatelly if file or folder name contains special characters (like é,á,ű,ő,ú,ü,ö,ó) than get Access Forbidden - Error 403. If change the folder name, than its ok.

I use xampp.

Any suggestion apperitiated, how to solve this.

Thank you.

Holian
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Mon 03 Jun '13 19:30    Post subject: Reply with quote

The online demo contains <meta charset="utf-8">. It might be worth a try to change that to <meta charset="windows-1252">.
Back to top
holian



Joined: 03 Jun 2013
Posts: 5
Location: Hungary

PostPosted: Mon 03 Jun '13 19:38    Post subject: Reply with quote

Yes, it contains that meta tag, but that file is independent, i think...

I edited DirectoryIndex and uploaded files to root of my server. So now every directory which not contain any index file, shown like this..

But tomorrow i will try to change the meta, and the config file, which is containt utf-8 coding too.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7404
Location: EU, Germany, Next to Hamburg

PostPosted: Mon 03 Jun '13 20:11    Post subject: Reply with quote

Anything in the error log? Do you use mod securtity?
Back to top
holian



Joined: 03 Jun 2013
Posts: 5
Location: Hungary

PostPosted: Tue 04 Jun '13 6:24    Post subject: Reply with quote

In error log nothing usable. No mod security. Something happen after implement the h5ai template. If i remove it, than url ok. So i think something wrong in the h5ai source, just don't undersand what.
Back to top
holian



Joined: 03 Jun 2013
Posts: 5
Location: Hungary

PostPosted: Tue 04 Jun '13 10:23    Post subject: Reply with quote

Try to change meta encoding, but nothing..
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7404
Location: EU, Germany, Next to Hamburg

PostPosted: Tue 04 Jun '13 11:37    Post subject: Reply with quote

If it is generated by an external script you have to make sure that the special charakter like ö ä ü etc are url encoded. You can see that by examinate your access log. For example ö needs to be %c3%b6 in the url.

Code:

<a href="%c3%b6%c3%b6%c3%b6/">ööö/</a>

or

<A HREF="%F6%F6%F6/">ööö</A>


Also you have to make sure that the javascripts and the pages have the same encoding. So the javascript files also need to be saved in UTF-8. However even than javascript often has troubles with UTf-8 and the url encoded stuff is better.
Back to top
holian



Joined: 03 Jun 2013
Posts: 5
Location: Hungary

PostPosted: Tue 04 Jun '13 11:59    Post subject: Reply with quote

I checked the JS files and encoded in UTF-8.

I installed wamp server too. Made a new directory in the root:

"Árvíztűrő tükörfúrógép"

And this is how its look like in browser:"%C1rv%EDzt%FBr%F5%20T%FCk%F6rf%FAr%F3g%E9p/"


And after i click on link get Forbidden error.

If i remove H5Ai than works fine, and handle the directory.

May i ask you to download the H5Ai and check what should be?

Thank you
Back to top


Reply to topic   Topic: Access Forbidden if url contains special characters View previous topic :: View next topic
Post new topic   Forum Index -> Apache