I was having a problem after transitioning from a Windows server for websites, to a Linux server. Some of the links to files on the site were broken, because they had a backslash in the url, instead of a forward slash. I struggled with this issue for some time, and wanted to present how I fixed it in case others are searching for this solution too.
1. First, make sure that mod_rewrite is loaded in Apache.
2. Make sure that in the
3. In the root directory of your website, create a file named .htaccess with the following lines:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)\\(.*)$ $1/$2
This should fix the problem.
Why would you have to do this? The website on my server in question is one that is maintained by other people. Because they use Windows systems, and aren’t aware of the forward and backslash issues with files, it would be too difficult to try and change their code. In a perfect world, this shouldn’t need to be done, but it is handy for those who develop on the windows platform.
I couldn’t find this kind of checklist anywhere on the net, but bits and pieces of this were taken from other sources. Specifically, the Rule was found here.
