Help - Search - Members - Calendar
Full Version: changing directory structure... redirects, etc..
Movable Type Community Forum > Additional Resources > Tips and Tricks
nolageek
I'm hoping some linux gurus here can help me...  

My blog's address was http://www.noleftturns.com/vincent

I found out that If I name the directory vincent.noleftturns.com (instead of just "vincent") that the subdomain would automatically be created.  Ok, cool.  BUT, now all of my hardcoded links are broken (as well as any permalinks that people may have bookmarked.  I tried linking vincent to vincent.noleftturns.com, but that only seems to work when telnetting or FTPing.

it was: /public_html/vincent
it's now: /public_html/vincent.noleftturns.com


CODE
ie. ln -s vincent.noleftturns.com vincent


I also tried a redirect, but that didnt solve my problems with links.

CODE
ie. (in .htaccess)
Redirect /vincent http://vincent.noleftturns.com


This seemed to work for people who typed in http://www.noleftturns.com/vincent - but not when people did http://www.noleftturns.com/vincent/photoblog

I'm assuming I can use mod-rewrite to make all of this seamless, but POSTIX syntax makes my head spin.


Thanks if you can help!!

Vincent
nolageek
After a bit more trial and error I figured out that you need a trailing slash after the target.

ie:

CODE
Redirect /vincent http://vincent.noleftturns.com/


and not:
CODE
Redirect /vincent http://vincent.noleftturns.com


It's always the little stuff.

Vincent
nolageek
Actually, this isn't working how I wanted it to.  links that point to the old "vincent" directory are now broken.

I tried the following mod-rewrite, and it didn't work.

Any sugesstions, anyone?

CODE
RewriteEngine On
RewriteBase /
RewriteRule ^vincent(.*)$ /vincent.noleftturns.com$1 [R,L]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.