apache - .htaccess 500 internal server error when adding simple 301 redirect -


this driving me crazy.

long story short can't change on .htaccess because generates 500 internal server error.

some days ago noticed weird, of files on server .htaccess included starting show line breaks between each line, or whole code in 1 long line caused thing breaking on site.

now whenever try add simple .htaccess 301 redirect: redirect 301 /random-file.html http://dumbsite.com/section/random-file.html

it gives me 500 internal server error, know happens when things wrong i'm 100% sure rule correct.

my theory has notepad++ of filezilla. question is: on notepad++ encoding or settings need have or not have avoid this.

and if filezilla cause, should use binary or ascii or auto transfer method , should leave "thread dotfiles ascii" ticked or not on transfer settings. i've tried every combination , no matter gives me 500 internal server error.

so maybe there's more 1 thing wrong.

update! ok, i've been debuging this. , can confirm error comes notepad++ i've reseted defaults both filezilla , notepad++ , error still happened. choose edit file regular notepad added 301 redirect , boom worked! filezilla ok. 301 ok , working.

the problem relies on format notepad++ using save .htaccess file. if tell me settings use generate functional .htaccess file notepad++ i'm set.

have tried check line breaks configuration notepad? because if edit code on windows windows format line breaks , put on linux server won't work. can convert them unix format in notepad edition menu.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -