This should be simple - can't figure out where I'm going wrong:
We have WordPress installed in the following location: http://example.com/gallery/cms and I want the site to be visible at http://example.com/gallery
I have the WordPress Address set to http://example.com/gallery/cms and the Site Address set to http://example.com/gallery
I copied the .htaccess and index.php to the /gallery folder. The .htaccess contains the following code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /gallery/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /gallery/index.php [L]
</IfModule>
The index.php contains the following code:
define('WP_USE_THEMES', true);
require('./cms/wp-blog-header.php');
The home page loads up fine, but any interior pages kick of a "Not Found" error: http://playstartshere.com/gallery/specs/
yields The requested URL /gallery/specs/ was not found on this server.
Where am I going wrong? I tried changing index.php to:
define('WP_USE_THEMES', true);
require('./gallery/cms/wp-blog-header.php');
but that broke the site entirely.
EDIT: ANSWER
Apache was indeed incorrectly configured; RewriteEngine was not enabled. However, the .htaccess was also wrong. Correct .htaccess for a configuration like what's above is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /gallery/cms/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /gallery/cms/index.php [L]
</IfModule>
Hope that helps someone else.