pi_1 Posted July 7, 2007 Share Posted July 7, 2007 I have a problem referencing sub-dirs of htdocs in my html code. This works fine: src="images/pic.gif" But This fails: src="/images/pic.gif" Unfortunately I have a lot of existing code which uses the second example's format (with the preceding slash). I need to configure my WAMP to work with this format. I am installing WAMP to match the php + mysql versions on an existing web server. So I cannot change versions of php nor mysql. I am using: Apache 1.3.37 PHP 4.46 MySQL 4.1.22 Can I configure Apache to work with this format: src="/images/pic.gif" ? Or would another version of Apache work? Thanks Phil Quote Link to comment https://forums.phpfreaks.com/topic/58821-referencing-sub-dirs-of-htdocs/ Share on other sites More sharing options...
wildteen88 Posted July 7, 2007 Share Posted July 7, 2007 That should work fine. When you have / at the beginning of a file path it means root. / should tell Apache to request the file 'images/pic.gif' from the document root. There may be a configuration issue or Apache1.3.x doesn't support it. I'm not sure I'll have a look at the Apache documentation. Quote Link to comment https://forums.phpfreaks.com/topic/58821-referencing-sub-dirs-of-htdocs/#findComment-291831 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.