Modify .htaccess
-
Hi everybody,
I need to modify the .htaccess in order to include a 301 redirect.
But I am having some problems with this.
I downloaded the file into my computer and then modified it with windows notepad, but when I upload it again to the server it is not working and turns down my website.
Even if I do not change anything on it. So I guess there is a problem in the saving process.
Any Idea or suggestion?
Thanks,
G.
-
Can you post the content of the htaccess here so we can have a look ?
-
i work with windows server not linux, but i would say it is the encoding, try saving it wirth different ecoding
Try saving as UTF-8 or ASCII, you can do this on the save as dialog box
-
Is it safe to post all the content over here?
-
Yes, it's safe - don't see a reason why that can be an issue.
Also take Alan's advice - maybe you are saving it a different format and that can also be an issue.
-
Perfect Alan! it worked.
Thank you very much!!
-
It was that!
Thank you!
-
Assuming it's not actually an issue with the code in the .htaccess file, it's probably something like Alan says, an encoding issue. It might also be the FTP upload method you're using to the server as well borking something in the file (i.e. FTP transfer type setting in your FTP client - try forcing the setting to "ASCII" rather than automatic or binary), or possibly a permissions issue on the file when it's uploaded, though that seems unlikely.
If you can edit in place on the server (using ssh and an editor like vim) then that would rule out those kind of problems.
-
no worries, also for the future FTP programs can alter the encoding also.
-
I highly recommend Notepad++ for that reason. Better control over the line return problems. Windows Notepad leaves much to be desired in this area.