Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other htaccess help needed !

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #35962
    mcgyver47
    Participant

    Hi
    I have copied my WP site from http://www.domain.org (database included etc..) to my home server for further local development.
    New local IP is: 192.168.1.xxx/MB
    Every thing is working well except none of my images located on original site in /wp-content/files/xxx.jpg are showing on local server (image not found of course)
    I am pretty sure I can use htaccess file to solve this problem but have not succeded so far
    Can I use something like :
    Redirect 301 /wp-content/files 192.168.1.xxx/MB/wp-content/files/
    This doesn’t work !
    Anybody any ideas ?
    Thanks for help
    Regards from France

    #93995
    TheDoc
    Member

    Install a plugin called Velvet Blues Update URLs. You can change all of the URLs on your local copy.

    #94027
    mcgyver47
    Participant

    Thanks
    Will give it a try and keep you posted on how it works
    Changing all URLs on local copy is to much to do as I have over 150 links to modify

    #94040
    mcgyver47
    Participant

    Unfortunatly Velvet Blues Update doesn’t do the trick in this particular case

    #94050
    TheDoc
    Member

    What doesn’t it change? It has worked flawlessly for me on many occasions.

    #94133
    mcgyver47
    Participant

    All images are referenced in original site: src=”/wp-content/files/onu-s.jpg”
    Original site is in root folder
    Local site : 192.168.1.190/MB
    Images are located in folder: 192.168.1.190/MB/wp-content/files/
    MB is just a sub-folder
    I havn’t succeded with suggested plugin this is why I think htaccess redirect instructions might be a better answer. Or may be I didn’t use plugin the correct way !
    Thanks for help

    #94136
    TheDoc
    Member

    Aaahhh, so it’s a relative link… interesting, as WordPress never does it like that. Is this something that you’ve hard coded into a template or you’ve modified the src URLs in the actual WordPress pages?

    I don’t know enough about htaccess to provide you with a solution there.

    #94257
    mcgyver47
    Participant

    it is definitly a relative link that I have hard coded into all posts with thumbnails
    To improve my coding practices how do you recommand I should code these src URLs in the future.
    Thanks for help

    #94259
    Billy
    Participant

    I’ve had the same problem that I can never get images into a template with HTML. I just use a div with a background of the image, and that does work for some reason.

    #94295
    TheDoc
    Member

    Have you hardcoded it into a template (single.php, page.php, etc) or have done on a post by post basis?

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Other’ is closed to new topics and replies.