base URL for ocPortal site
Posted
#5387
(In Topic #1098)
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
Posted
Posted
Posted
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 and Updates/Senergy_v18.1/HF_181_2.zip"
and the wikis:
"
Code (php)
Any way to change these programmatically? I have hundreds, maybe thousands of links.
Thanks, any feedback appreciated.
Posted
Anyone have any idea if I can use relative URLs instead of fully qualifying them?
Posted
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.
Posted
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.
Posted
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/');
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.
Posted
1 guest and 0 members have recently viewed this.