HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Changing URL does not change content locations!

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#93695 (In Topic #18721)
Avatar

Honoured member

I have had this issue with several websites now and really need a solution for it. I build websites in a shared environment with inherent test domains " http://website.ca.randomnumbers.gridserver.com/". However when i change OcPortals URL through master settings + clear cache everything 'dose' seem to working, images, files, and all other content on the new URL. However all the content still lists as "http://website.ca.randomnumbers.gridserver.com/" Example: You are on 'www.website.ca' but if you hover over an image/file it is on 'www.website.ca.numbers.gridserver.com'. This is very bad for Google analytics.
 
How can I remedy this ongoing issue?
Back to the top
 
Posted
Rating:
#93702
Avatar

I wonder if something on the server is adding that in as a content delivery network (basically making gridserver.com sit on the front as a load balance / geographic distributor, proxying the requests). Changing the ocPortal base URL should be trivial, so I'd be surprised if there's a bug. I'd ask the webhost if that's the case, but if it is, it's probably good – assuming it does not happen for actual page URLs.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#93739
Avatar

Honoured member

Content is actualy displayed as " http://website.ca.randomnumbers.gridserver.com/" in com code. If i edit a comcode page an image/attachment still retaints the gridserver url even after the site has become something like www.website.ca.

Would this still be related to the host?
Back to the top
 
Posted
Rating:
#93748
Avatar

Ah, if it is actually saved inside Comcode that could happen. I didn't think of that, that is a result of us not having the HTML to Comcode conversion turned on anymore by default, once stuff saves it sticks.

Make sure you have a backup of your ocp_translate table, then run this query:

Code

UPDATE ocp_translate SET text_original=REPLACE(text_original,'http://website.ca.randomnumbers.gridserver.com/','http://www.website.ca/'),text_parsed='';

That will fix stuff in the DB.

Comcode pages are .txt files on disk. I didn't want to suggest you edit them all, or download all to do a big search and replace, so I am fudging in something to your unrelated password feature. You'll be able to add this line to the bottom of info.php and it'll dynamically perform substitutions on the .txt files as it loads them:

Code

$SITE_INFO['reps']['http://website.ca.randomnumbers.gridserver.com/']='http://www.website.ca/';
I figure this is generally useful to people, so don't mind adding it in.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#94610
Avatar

Honoured member

Now that i have more time to revisist earlier sites what had this issue. Is there a way to apply this fix to a site i am not able to use the password feature?
Back to the top
 
Posted
Rating:
#94612
Avatar

I think I probably changed sources/site2.php. Go into your FTP, your sources directory, and sort by file data. That should confirm whatever files I changed.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: