Forum Moderators: phranque
My old directory structure looked like this:
index.php (a file)
this.php (a file)
that.php (a file)
the_other.php (a file)
/linkable_images (a directory)
My new structure looks like this:
index.php (a file)
this.php (a file)
that.php (a file)
the_other.php (a file)
/linkable_images (a directory)
/my_new_wordpress_site (a directory)
The goal here is that all of the old top-level files no longer matter, and all requests for them go into /my_new_wordpress_site BUT that requests for resources in /linkable_images still be accesbile.
I managed to get the redirection to /my_new_wordpress_site to work using the following, but unfortunately ALL requests go into /my_new_wordpress_site and thus my /linkable_images images aren't, well, linkable anymore...
RewriteEngine On
RewriteBase /
RewriteRule ^(.*) http://www.example.com/my_new_wordpress_site [R=301]
Can anyone explain how to do what I'm trying to do and provide a working example, please?
[edited by: jdMorgan at 7:01 pm (utc) on Nov. 21, 2006]
RewriteCond $1 !^linkable_images
RewriteRule (.*) http://www.example.com/my_new_wordpress_site [R=301,L]
RewriteCond %{REQUEST_URI} ![b]^/l[/b]inkable_images
RewriteRule (.*) http://www.example.com/my_new_wordpress_site [R=301,L]
RewriteCond $1 !^linkable_images
RewriteRule (.*) /my_new_wordpress_site [L]
Jim
[edited by: jdMorgan at 7:00 pm (utc) on Nov. 21, 2006]