...

View Full Version : htaccess special characters



secretfire
12-13-2010, 10:32 AM
Dear forum,

having renamed a folder from

/waarzegster-helderziende-BelgiŽ/

to

/waarzegster-helderziende-Belgie/


- I'm finding it difficult to get the htaccess 301 redirect to pick it up.

many pages are in the google index, for example:

http://www.helderziendelezingen.be/waarzegster-helderziende-BelgiŽ/december/focus.html

how can i make the folder redirect pick it up?

I've tried the lines below which don't work:

redirect 301 /waarzegster-helderziende-BelgiŽ/ http://www.helderziendelezingen.be/waarzegster-helderziende-Belgie/

and

redirect 301 /waarzegster-helderziende-Belgi%C3%AB/ http://www.helderziendelezingen.be/waarzegster-helderziende-Belgie/

Thanks I really appreciate the help


Will

Apostropartheid
12-13-2010, 04:40 PM
I'm almost certain that .htaccess is case-sensitive. Have you tried using "Rewrite"?

secretfire
12-14-2010, 09:34 AM
Hi thanks for writing - i've been looking at rewrite this morning and think its possible although a little bit pro - perhaps it would take me an equivalent time to learn hieroglyphics? so at the moment I'm going between that and attempting the 301 redirect as something like:

redirect 301 /waarzegster-helderziende-Belgi%235/ http://www.helderziendelezingen.be/w...ziende-Belgie/

or surely there must be something like:

redirect 301 /waarzegster-helderziende-Belgi*/ http://www.helderziendelezingen.be/waarzegster-helderziende-Belgie/

so any other character before the forward slash becomes the standard "e"

I'm sure the rewrite with correct syntax would work too..

Apostropartheid
12-14-2010, 05:49 PM
Did you try what I suggested, i.e. writing "redirect" as "Redirect"?

I realise this is unclear because I wrote "rewrite" instead of "redirect" in my previous comment. Sorry!

secretfire
12-19-2010, 11:31 AM
thanks for the help - its an unusual solution whereby entering in notepad:


√ę

in place of the Ž makes it work,

but, when saving the htaccess and reopening it, the √ę actually shows as Ž.


ok so if it changes also in posting this message, im talking about a capital A with ~ above and 2 left arrows in 1 character like a small << - this changes into an Ž on notepad saving - and works in htaccess.

this issue therefore is something to do with text file encoding - when copy pasting an Ž from the browser address bar, or an Ž from anywhere else, putting it in the htaccess does not work.

when putting in this √ę it just works - even when reopening the htaccess it looks exactly the same as an Ž. - i'm happy its fixed because of losing pages in the index and then webmaster tools started getting 404 and 403 crawl errors.

hopefully this thread will appear in google for anyone else searching for apache htaccess special characters (one or two others seem to have had this problem unresolved.)

so thanks for encouragement,

Will

secretfire
12-19-2010, 11:48 AM
ps not something i know much about, but it seems for this solution (and i think for all htaccess files to work?) they have to be saved as ANSI type text files, rather than UTF-8 or unicode.

in my next life id love to learn about rewrite!

id kinda like to be able to forward anyone typing in just:

http://www.helderziendelezingen.be/waarzegster-helderziende-Belgie/

to say the homepage (currently this is a 403 in web master tools crawl errors), but for the above not to pick up the below generic rule, otherwise both conditions would end up at the homepage?:

redirect 301 /waarzegster-helderziende-Belgi√ę/ http://www.helderziendelezingen.be/waarzegster-helderziende-Belgie/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum