Htaccess power

apps

#1

if have many videos here

domain.com/gems/diamonds/foldername/whatever.flv
domain.com/gems/diamonds/anothername/something.flv

etc etc

and if I move them to

domain.com/diamonds/foldername/whatever.flv
domain.com/diamonds/anothername/something.flv

is there a htaccess file I can write that will redirect ALL the URLS that used to work to the URL’s that do work?

:slight_smile:


http://theMezz.com


#2

To be more specific I want to move all my movie files from

http://xxxxxxx.com/2009/video

to

http://xxxxxxx.com/video

and have the links to the sub folders under “video” still work.

I know that htaccess can do that with rewrite … but have no idea how to do it


http://theMezz.com


#3

While you wait for a .htaccess expert, why not create a symbolic link from the old directory to the new one? Is it because you want an actual redirect and not for both to respond?

And to clarify your request, is all you want to happen is for the rewrite to delete the 2009/ part of the path?

-Scott


#4

I do not know how to make symbolic links. Sounds useful.

What I want is when someone goes to

http://theMezz.com/nuggest/Video/HCCC/

they really go to

http://theMezz.com/video/HCCC

but for all the dir’s there

http://theMezz.com/nuggets/Video/ANY DIR

to

http://theMezz.com/video/ANY DIR

thanks for any help


http://theMezz.com


#5

SSH in to your account and then:
cd ~/theMezz.com
ln -s video nuggets

It creates a folder alias for nuggets called video. When you go to video, you’re really in nuggets. The only downside is that it will appear that you’re running two identical directories in parallel.

Your original request for the htaccess syntax would be the better way. Now would be a good opportunity to learn a bit about htaccess.

http://www.webmasterworld.com/apache/3389121.htm

-Scott