Lost my old site…

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”: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:

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

So off to figure out what this all means,

“RewriteBase”:http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#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”:http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#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”:http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#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.

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: