Zalaeth Posted October 19, 2013 Report Share Posted October 19, 2013 Hi, I've installed Uniform Server from scratch, however there is an issue. I can't use links such as these => href="/favicon.ico" It doesn't work, it doesn't add the file, I am forced to do something like this instead => href="../favicon.ico" depending on the number of folders that separate the two files. I assume that's a setting, but I've never had to change that setting before, it always worked by default, and this problem is absolutely ungooglable. Anyone knows how to fix it? Quote Link to comment Share on other sites More sharing options...
Zalaeth Posted October 19, 2013 Author Report Share Posted October 19, 2013 Ah I've found the issue, the root path was not there I thought it was. Is there a way to delete this thread? Quote Link to comment Share on other sites More sharing options...
Ric Posted October 19, 2013 Report Share Posted October 19, 2013 Is there a way to delete this thread? Any admin can delete a thread however you raised an issue and more importantly found a solution. This benefits other uses with the same or similar problem hence no reason to delete this thread. All the bestRic Quote Link to comment Share on other sites More sharing options...
Zalaeth Posted October 19, 2013 Author Report Share Posted October 19, 2013 In this case I'll give a more detailed explanation. My root directory was the following :C:/UniServer/www In this directory, I have different directories for different projects : C:/UniServer/www/project1C:/UniServer/www/project2 A link such as 'href="/favicon.ico"' will go look at the root of the Apache folder, which is typically www, in contrary to a PHP url which considers "/favicon.ico" to be in the folder where the first PHP page was called for the request. Solution 1 Use the following href link = 'href="/project1/favicon.ico' instead of 'href="/favicon.ico"' Solution 2 Find your httpd.conf file in your Apache directory, modify this line : <Directory "C:/UniServer/www"> To this : <Directory "C:/UniServer/www/project1/"> Then restart Apache However, note that this means your other projects in the www folder will not be accessible anymore as they will be outside Apache. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.