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 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Change home directory for html/ssi links

    Hi,

    I dont think there is any way to do this, but if there is...

    My situation:

    The sysadmins give me access to a subdirectory that is in the public_html folder (visible online)

    I am building a site that is going to go in the root directory of another server. My problem has to do with relative links.

    On the production server the relative links will have to be like "/images/image.jpg" but on the dev server it has to be "/my_dir/images/image.jpg". The same thing applies to ssi links that Im using.

    Is there any way to redirect all my links using htaccess or any other methods so my dev server can have teh exact same code as my prod server?

  • #2
    New to the CF scene
    Join Date
    Feb 2011
    Location
    القاهرة، مصر
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Use the <base> tag

    I think you can use the <base> tag for this, but it causes all links (and image references) on the page to be redirected to the path you specify in its href attribute.

    See this tutorial: HTML <base> Tag

    Hope this helps


  •  

    Posting Permissions

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