base URL for ocPortal site

Post

Posted
Rating:
#5845 (In Topic #1390)
Standard member
k_dean_curtis is in the usergroup ‘Fan in action’
Any help appreciated here. Our old ocPortal site is on a windows 2008 server shared by other web sites.
We are trying to split them up. The existing URL for my site is:
" www.mySite.com/ocportal/site/index.php"

However, when I put in the new URL
"support.mySite.com/ocportal/site/index.php"

It keeps redirecting to the old URL, which will no longer be valid. We have searched in IIS, the PHP folder, ocPortal folders, etc and have not found anywhere that the URL is hard coded or redirected.

Any idea where we can search for how this URL is getting redirected?
Thanks
Online now: No Back to the top

Post

Posted
Rating:
#5847
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
It should be in info.php, the base_url setting.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#5849
Standard member
k_dean_curtis is in the usergroup ‘Fan in action’
Found it Chris, thanks!
Online now: No Back to the top

Post

Posted
Rating:
#5853
Standard member
k_dean_curtis is in the usergroup ‘Fan in action’
Sigh. Not out of the woods yet. Changing the base URL does not affect the explicit URL path for content in "my_downloads" or the wikis.

All the content has the URLs for the www address. For example, in my_downloads:
"http://www.mySite.com/ocportal/uploads/website_specific/my_downloads/Releases%20and%20Updates/Senergy_v18.1/HF_181_2.zip"

and the wikis:
"http://www.MySite.com/ocportal/site/index.php?page=downloads&type=entry&id=releases-and-updates%2Fsenergy-v18-1%2Fv18-1-hot-fix-2"

Any way to change these programmatically? I have hundreds, maybe thousands of links.

Thanks, any feedback appreciated.
Online now: No Back to the top

Post

Posted
Rating:
#5857
Standard member
k_dean_curtis is in the usergroup ‘Fan in action’
OK, I found where in mySql I can change the URLs in ocp_download_downloads. Looking for how to change the links to other pages in the wikis.

Anyone have any idea if I can use relative URLs instead of fully qualifying them?
Online now: No Back to the top

Post

Posted
Rating:
#5858
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

Easiest thing would be to do an SQL export from (e.g.) phpMyAdmin, then do a search and replace in a text editor (e.g. Notepad++), then reimport.

That may corrupt compiled Tempcode in the database, but I think it will auto-regenerate itself if corrupted.
If not, we can discuss that.

It is also possible to use SQL REPLACE queries direct on the database.

I will reply again with more details.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#5859
Standard member
k_dean_curtis is in the usergroup ‘Fan in action’
Yes, that is what I meant: doing a direct SQL replace on "ocp_download_downloads.url".
Problem is, I cannot find the db table where the wikis are stored, and cannot find them on the file system.

Thanks for you help, any info appreciated.
Online now: No Back to the top

Post

Posted
Rating:
#5861
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Right…

To be clear to anyone reading, what I write is applicable to ocPortal (v9), not Composr. Composr has changed in a couple of ways.

Wiki+ content is stored in the seedy_pages and seedy_posts table. That's legacy naming, we renamed it a couple of times.

However, the actual text is likely in the translate table. Almost all text is there, as it is subject to translation.

You can do string replaces in SQL like this…

Code (SQL)

UPDATE tablename SET fieldname=REPLACE(fieldname, 'https://old.example.com/', 'https://new.example.com/');
 
Replace tablename and fieldname as appropriate. For the translate table, you'll also want to clear out text_parsed, wherever there is a match so it gets regenerated. e.g.:

Code (SQL)

UPDATE ocp_translate SET text_original=REPLACE(text_original, 'https://old.example.com/', 'https://new.example.com/'), text_parsed='' WHERE text_original LIKE '%https://old.example.com/%';
 

If the text_parsed column is blank (as set above), or corrupted in some way, it'll get auto-regenerated. I've just confirmed that.

Sorry I'm being slow to reply at the moment, I've really been bogged down since moving house.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#5872
Standard member
k_dean_curtis is in the usergroup ‘Fan in action’
Thanks a bunch Chris, that helps a lot!
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top