Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question File path problem

    Check my website jobs.nimrans.com
    On the index.php of this domain you will find Login link on the top of the page on a black strip.
    I have linked this Login link to index.php of my website www.nimrans.com
    But this link is not working correctly and doesn't open that page. Is there any coding problem? Or any other problem? Please check it and help me.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Can't see a thing without the source.
    What's the link href provided in the page? Does it match what is expected?

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    somehow, the whole server path is included in the URL ...

    http://jobs.nimrans.com/home/nimrans...html/index.php

    But it only seems to be on that link.
    Do you have a page where the login exists?

  • #4
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts
    No, the Login link has this code
    <a href=/home/nimransc/public_html/index.php>Login</a>

    Yes i have a page where login exists.

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    well, obviously it doesn't exist.

    This is what the link should be: http://www.nimrans.com/
    Which is the same as: http://www.nimrans.com/index.php

    Click those two links and see what happens ...
    It looks a lot like a login to me.

    Are you doing some funky mod rewrites in your .htaccess file?

    You don't need to put each page or section in its own directory.
    Not sure what this is all about ... what are these directories for?

    ...nimrans.com/Search/search.php
    ...nimrans.com/Help/help.php
    ...nimrans.com/MyAccount/myaccount.php



    .
    Last edited by mlseim; 02-13-2012 at 04:24 PM.

  • #6
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts
    If file.php is in my subdomain and there is a link in file.php. Now i want to connect this link to a file index.php that is in my public_html.

    I tried the following:
    <a href=/home/username/public_html/index.php>Link</a>

    But this is not opening the index.php. I think that the path that i am using is lacking something. Please tell me if this path requires some change.

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    HTML is jailed to its root directory. PHP can go across subdomains, but HTML cannot. You need to provide it with a full link to the target. /home/username/public_html is not accessible in HTML.

  • #8
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    Why won't this work ....

    <a href='http://www.nimrans.com/'>Link</a>

    That seems rather obvious.
    I'm I missing something here?

  • #9
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thanks both of you. My problem is solved. I gave full path to my link i.e.
    <a href='http://www.nimrans.com/file.php'>Link</a>. And now its working correctly. But as much as i can remember, i did it using /home/..../public_html/, last time. Anyways thanks.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •