By lsrzj on
I migrated my site from xoops to drupal :-) and there were a need to change the files folder to another location in the filesystem. Before it was a part of the xoops root so requests to a file such as
http://bioinfo.cpqrr.fiocruz.br/files/courses/biomolstacasa2006/Aula_1.ppt were valid. Now it resides on sites/bioinfo.cpqrr.fiocruz.br/files/ and all of my links became broken because of this. What I'm trying to do is creating a rewrite rule that redirects all of the requests to /files/* to /sites/bioinfo.cpqrr.fiocruz.br/files/* I don't know regex very much and I don't know much about apache's rewrite engine. Could please someone help me?
Comments
=-=
wouldn't it be possible? to go to administer -> file system and set up the relative path ?
I didn't think about that
Sometimes we forget about the simpler ways to do things and we complicate what's simple. But when I migrated the site I forgot that could be there somebody linking from other pages to my site's files and adapted all my internal links to the new path. So if I apply your solution I'll have to edit all my content to remake all the links again.
=-=
I'd investigate editing the content by writing a query to do so and update it all at once through MySQL
I dumped my database
I dumped my database and updated all links. A little bit dangerous doing this since I got a mysql error telling about max packet size limit. I had to modify my dump to be able to update everything.