Jump to content

Recommended Posts

Hi there. I have a problem with Apache. Whenever I insert a php file's relative path in a website's link:

for example: <a href="new.php">New</a>

the server tries to download the php file instead of running it through the server. It seems Apache doesn't automatically interpret .php files when using relative paths. To make it work, I have to insert the absolute path, something like:

<a href="http://localhost/webroot/new.php">New</a>

It works, but that's just a temporary solution. I'm wondering if I accidentally modified something in the Apache configuration file, or if there's something I'm supposed to modify but haven't. Any of you know how can I solve this problem?

Thanks a lot in advance.
Link to comment
https://forums.phpfreaks.com/topic/3546-problems-with-the-relative-path/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.