Tongfamily.com

Tong Family Tips and Tricks

Tongfamily.com header image 2

Lost my old site…

March 23rd, 2008 · No Comments · Wordpress

WordPress seems to hide old files of mine, so although I have my complete MovableType site, when I type for instance http://tongfamily.com/mt.index.php, even though the file is there, I get a 404 not found. This seems to a problem with rewrite rules as changing thename to mt.index.html lets you see the file fine.

In looking at .htaccess, I see WordPress has done some rewriting:


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

So off to figure out what this all means,

RewriteBase tells Apache that no matter how you came into with whatever URL, you should just assume you came in at the root of the website. So if you came in a http://tongfamily.com/foo, it rewrites it to http://tongfamily.com/

RewriteCond seems pretty straightforward, it says when does a rewrite happen, if the filename requested that is the full local filesystem path name where ! means not an -f means where the coming file isn’t a regular file or a !-d means or is not a directory. If that is true, so you can’t find it as either a file or directly, then

RewriteRule says take . which is any single character and rewrite it to /index.php and the L means that this is the last rule so you can stop preprocessing.

Tags:

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.