Grow your CSS skills. Land your dream job.

htaccess help needed !

  • # January 4, 2012 at 12:16 pm

    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

    # January 4, 2012 at 12:26 pm

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

    # January 5, 2012 at 2:07 am

    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

    # January 5, 2012 at 7:34 am

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

    # January 5, 2012 at 12:27 pm

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

    # January 6, 2012 at 12:24 pm

    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

    # January 6, 2012 at 12:34 pm

    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.

    # January 8, 2012 at 3:05 am

    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

    # January 8, 2012 at 3:20 am

    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.

    # January 8, 2012 at 7:24 pm

    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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".