SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    SitePoint Member
    Join Date
    May 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    links not working in xamp on local but work in production

    I installed XAMP and copied my entire site down and put it in htdocs. I can see the index page, but the page's links and css are broken.

    My local site:

    //localhost/libweb/

    my production environment:

    //sitename.edu

    and the physical address on the box is:

    f:\inetpub\libweb

    Any ideas?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Does your site rely on rewrite rules in a .htaccess file? Have you enabled mod_rewrite in your httpd.conf?

  3. #3
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is nothing like htdocs in Windows environment. Are you in Windows or Linux environment?

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thewebhostingdir View Post
    There is nothing like htdocs in Windows environment
    Sure there is, you can name your document root anything you want

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,605
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    ... and htdocs is Apache's default directory for its website (localhost) files.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  6. #6
    SitePoint Member
    Join Date
    May 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    windows

  7. #7
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    ... and htdocs is Apache's default directory for its website (localhost) files.

    Regards,

    DK
    Domain is hosted on Windows server. So do you think there is anything like htdocs in Windows?

    I know about Linux that it is possible.

  8. #8
    SitePoint Member
    Join Date
    May 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes htdocs is default directory. so how should my paths be formatted?

  9. #9
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gnosis_gc View Post
    yes htdocs is default directory. so how should my paths be formatted?
    I am sorry but I have not seen like htdocs in Windows before!

  10. #10
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,576
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    .htdocs isn't a linux thing, its an apache thing. So you can have it on windows, just like you can have apache on windows.

  11. #11
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    .htdocs isn't a linux thing, its an apache thing. So you can have it on windows, just like you can have apache on windows.
    Thanks for this.

  12. #12
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gnosis_gc View Post
    I installed XAMP and copied my entire site down and put it in htdocs. I can see the index page, but the page's links and css are broken.

    My local site:

    //localhost/libweb/

    my production environment:

    //sitename.edu

    and the physical address on the box is:

    f:\inetpub\libweb

    Any ideas?
    Please let us know if you are receiving any specific type of error message?

  13. #13
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems this is an error related to the path, the error logs will give the correct clue.
    ------------
    hzSari | HostingZoom.com
    ModVPS.com | ResellerZoom.com
    Power Speed Reliability

  14. #14
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SariJ View Post
    Seems this is an error related to the path, the error logs will give the correct clue.
    How can we check error logs in IIS?

  15. #15
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,605
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    The error has nothing to do with path - the virtual host hasn't been setup (nor hosts file updated) to mimic the production server. Simple stuff, really!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  16. #16
    SitePoint Member
    Join Date
    May 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    explain how to configure/edit virtual host hasn't been setup (nor hosts file updated) to mimic the production server

  17. #17
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,605
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    g_gc,

    Look in your Apache directory for the config folder, open httpd.conf and httpd-vhosts.conf.

    UNcomment the include httpd-vhosts.conf line in httpd.conf

    COPY the example in the httpd-vhosts.conf file then correct the ServerAlias and path lines (every instance that does not apply to your domain), e.g.,
    Code:
    <VirtualHost *:80>
    ServerName arj
    DocumentRoot W:/ARJ
    ServerPath W:/ARJ
    </VirtualHost>
    where arj will replace my localhost in a local test, the physical directory used for DocumentRoot is on my W: drive in the ARJ directory.

    Open your (extensionless) hosts file (C:\windows\drivers\etc\hosts) and add
    Code:
    127.0.0.1 arj
    using YOUR shortcut for the local domain.

    Restart Apache and you're all set.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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