midgley Posted March 22, 2010 Share Posted March 22, 2010 Hello, I've been tasked with creating a secure CMS and have up until now had little trouble, however i seem to have hit a brick wall. The problem is that many of the documents have embedded hyperlinks to other documents held on the system and I’m really not sure how to maintain the links. The only workaround I can think of is to somehow redirect 404s to a script that takes the URL and wildcards it against the name of documents in the database but this is obviously a troublesome solution. Anybody got any better ideas, or can point me in the right direction? Thanks in anticipation. Andy Quote Link to comment https://forums.phpfreaks.com/topic/196105-maintaining-hyperlinks-when-storing-documents-in-mysql-blobs/ Share on other sites More sharing options...
freakstyle Posted April 1, 2010 Share Posted April 1, 2010 so you have a link inside content to another url. the content is manged through an administration interface, assumed. what is it that you are looking to maintain in the content of the document? You mention links, however what about them do you need to maintain and why? do you need to update them when a document is no longer active or it's been deleted? do you need to change attributes in the href based upon some other logical sequence? w/o knowing specific needs you could... - have a script in the admin tool that can be ran by an admin user to clean up existing content. which then grabs the content, parses out the links from the text and makes changes as determined by your business logic. - use javascript after the document is rendered to modify links that need to be modified Quote Link to comment https://forums.phpfreaks.com/topic/196105-maintaining-hyperlinks-when-storing-documents-in-mysql-blobs/#findComment-1035563 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.