Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-13-2010, 10:32 AM   PM User | #1
secretfire
New to the CF scene

 
Join Date: Apr 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
secretfire is an unknown quantity at this point
htaccess special characters

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/w...ber/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/w...ziende-Belgie/

and

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

Thanks I really appreciate the help


Will
secretfire is offline   Reply With Quote
Old 12-13-2010, 04:40 PM   PM User | #2
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
I'm almost certain that .htaccess is case-sensitive. Have you tried using "Rewrite"?
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Users who have thanked Apostropartheid for this post:
secretfire (12-19-2010)
Old 12-14-2010, 09:34 AM   PM User | #3
secretfire
New to the CF scene

 
Join Date: Apr 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
secretfire is an unknown quantity at this point
rewrite for htaccess special characters

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/w...ziende-Belgie/

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

I'm sure the rewrite with correct syntax would work too..
secretfire is offline   Reply With Quote
Old 12-14-2010, 05:49 PM   PM User | #4
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
Did you try what I suggested, i.e. writing "redirect" as "Redirect"?

Edit: I realise this is unclear because I wrote "rewrite" instead of "redirect" in my previous comment. Sorry!
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Users who have thanked Apostropartheid for this post:
secretfire (12-19-2010)
Old 12-19-2010, 11:31 AM   PM User | #5
secretfire
New to the CF scene

 
Join Date: Apr 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
secretfire is an unknown quantity at this point
htaccess special characters solution

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

Last edited by secretfire; 12-19-2010 at 11:34 AM..
secretfire is offline   Reply With Quote
Old 12-19-2010, 11:48 AM   PM User | #6
secretfire
New to the CF scene

 
Join Date: Apr 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
secretfire is an unknown quantity at this point
text file encoding

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/w...ziende-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/w...ziende-Belgie/
secretfire is offline   Reply With Quote
Reply

Bookmarks

Tags
htaccess, special characters

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:06 AM.


Advertisement
Log in to turn off these ads.