I don't understand what somi-solid means but as I read "solid" I suggest the extraction of the drug with one or more of the solvents mentioned in your question. Depending on the matrix and the following analytical method you may have to get rid of some matrix components. In a gel/salve I guess the drug's concentration may be sufficiently high to dilute the extract quite high and this may be already enough to dilute the matrix below its threshold of interference. If not you need to do some clean-up: test different solvents for the extraction with respect of extraction yields of analyte and matrix - evaporate the solvent after extraction and use a different solvent to re-dissolve the dried analytes in which the analytes are highly soluble but not the matrix component(s) (you could "play" with different pH as lots of drugs have basic/acidic characteristics) - you could perform an SPE clean-up with the extract ect.
And another wild and brave advice: Type the words "drug salve extraction analysis" in google.scholar and you will be surprised! ;)
I have solved a similar problem one time by diluting the sample into a larger volume of water with a appropriate buffer.
The procedure is something like weighting 1 gram of the gel into a bottle a then add water to 25 ml. Shake for 5 min. In my case the gel dissolved completely in water. After this I could use the same SPE as was common for the drugs analysis in water and urine.
I have done trial like this:my drug has solubility in methanol and chloroform ,so i have weighed exact quantity of gel and dissolved in 5ml of methanol as it is aqueous base gel and i don't know the excipients so they may get dissolved in methanol so i hv used minimum quantity of methanol then make up the volume with chloroform so polar excipients can't dissolved.in one article i referred that they have used propylene glycol and hydroxy ethyl cellulose.after that i have taken uv spectra of same conc.of api and gel .they almost overlapped but in gel it showed slightly higher absorbance than api.what i hv to do???