We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

moving my directory, issues with references

How Do I?

mhallaba's avatar
mhallaba
32 posts
8 years ago
mhallaba's avatar mhallaba

Hi all,

Just moved my site from www.site.com to www.site.com/old.

Changed everything in control panel etc.

I have a folder set up for channel entry attachments. It collects videos. Simply changed the reference to that and it’s working fine.

But then none of my images are showing. In my templates all the references are relative. So for exmaple, /images/logo.png.

When I render, they still reference www.site.com/images/logo.png instead of www.site.com/old/images/logo.png.

I cannot figure out how to fix this. Everything else seems to be working fine.

Can someone assist?

       
mhallaba's avatar
mhallaba
32 posts
8 years ago
mhallaba's avatar mhallaba

when i look at rendered source code its like the template thinks its still in www.rekt.gg not www.rekt.gg/old.

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
8 years ago
Ingmar Greil's avatar Ingmar Greil

There’s an issue with your references. You could use “images/foo.png”, in which case it doesn’t matter in what subdirectory you are (as long as it contains a folder named “images” with the appropriate files), but if you use “/images/foo.png” your browser will look for a top-level directory named “images”.

A few things you can try:

1) Simply copy your “images” folder back to the top, i.e. above “old”. There is no harm in having this directory there, even if the new site will have to share.

2) Create a sub-domain by the name of “old”, ie. old.example.com and match it to the “old” directory.

3) Use mod_rewrite.

4) Change your image references with a global search & replace.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.