I have moved a site from one host to another, and in doing so came across the trap of failing to download my .htaccess file in the process.
I am attempting to rebuild said .htaccess based on an earlier (possibly non-working) saved copy, but all I've been getting is 404 pages. In other words, something is wrong with this simple rewrite rule, but I assume mod_rewrite is working properly, as I'm no longer seeing "internal server error 500" type errors and other vhost sites are operational with mod_rewrite on the same machine.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([^/.]+)/?$ index.php?page=$1 [L]
</IfModule>
A sample (actual, working) page from my site:
site.com/index.php?page=tips
All of my links, and hopefully address bar should be in this form:
site.com/tips/
I thought I understood this; it isn't terribly complex. I've mangled and troubleshot the RewriteRule line to a variety of combinations based on various websites' suggestions. I have googled for two days and found some things that are close to what I'm doing, but no exact matches. Every time I make a change, I've been restarting apache service on the server, going to Chrome on my local machine and hitting Ctrl+F5 to clear cache and refresh; is there any chance I'm missing a "clean reload" step?
The entire site takes place through index.php, and I'm not planning to complicate things with further nesting until I understand regex much better. Any help is greatly appreciated!
Side notes: I'm on Apache v2.2.22, and I can't seem to get this version's "RewriteLogs" feature working (not using .htaccess for this, of course) or I wouldn't have posted this noob question today. In 2.4, this feature is no longer valid anyways (logging got a total overhaul), but I can't seem to upgrade to that yet using apt-get on my OpenVZ Ubuntu 12.04 x64 server.