Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: phranque
How do I move all files into one directory to another?
Example of what I need to do:
I have thousands of files in /home/accountname/public_html/directory/subdir/sub-subdir/
I need to move all the files contained in /sub-subdir/ into /home/accountname/public_html/directory/subdir/
Or are you wanting to throw away any "age" and "history" ranking benefits of those pages by giving them all a new URL too?
The first option needs a rewrite, but needs no changes to the site content.
The second option needs a redirect, and all the internal links on the pages also need to be amended.
[edited by: g1smd at 2:11 am (utc) on May 22, 2009]
That is, if you use a rewrite, users will continue to use the same URLs as before, and the rewrite will fetch the content from the new server location without revealing that new location to the user.
The files are all video files.
I need to move them up one directory so users on the web can play them when they go to the site.
I don't need to do any redirects for the video files because I already told the CMS to look in the new directory (where I want to move them) to play them.
Other user agents that have references to the old URLs stored in memory, and users with bookmarks, will now get "404 Not Found" if you have given the videos new URLs and you do not redirect requests for the old URLs.
However more important than that, is that just because you have moved stuff around inside the server, doesn't mean that the files now have to have new URLs. Using a rewrite (that's a rewrite, not a redirect) you can continue to use the old URLs while having the files stored someplace else inside the server.
This gets overlooked very often, and there's several threads on this topic in the Apache forum in the last couple of days, and hundreds more over the last few years.
For example. I have /home/accountname/public_html/directory/subdir/sub-subdir/video123.flv The URL web users use to access this video is www.mysite.com/video123.html for example.
Web users will still have to go to www.mysite.com/video123.html to access the video but the video will be in /home/accountname/public_html/directory/subdir/video123.flv
Hope that clears it up.
I thank you for your response. I have already taken care of the fact that users need to see the files in new URLs. I have setup a 301 redirect for all the files.
The files have been moved and only in one directory so there will be no issue with duplicate content.
The users see the files perfectly now, no 404's and no duplicate content.
Yes I think you're right about SEs not indexing .flvs.
This is what's up:
I was using a CMS that had URLs like this www.example.com/name-of-video-11.html for example, 11 being the video ID that's stored in the database.
I changed CMSs to where the new URLs are www.example.com/11/name-of-video.html. I properly set up a 301 redirect from the old URLs to the new.
What I needed to do was move the video files to the directories where the new CMS looks for them when a user requests www.example.com/11/name-of-video.html
Even if I had the video files in both directories at the same time wouldn't cause duplicate content because like you said SEs don't index .flv files, unless you link to them directly on a page I believe.
I understood what you were saying, but I don't think you understood what I was originally saying. Everything's good now. The files are moved and the new CMS is working and nobody's getting 404's. Thanks for your help people.
[edited by: phranque at 7:08 am (utc) on May 24, 2009]
[edit reason] exemplified urls [/edit]