The application i'm developing uses a certain file directory structure. Via the use of mod_rewrite and .htaccess files, i manage to have friendly urls for our users. It works fine on my local server, but once on the production server, it fails: apparently, the server throws a 404 error before the .htaccess has a chance to kick in.
Here is the .htaccess i'm working on (referenced as (1) here below):
IndexIgnore *
#Options +FollowSymLinks
RewriteEngine on
RewriteOptions inherit
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*)$ /~extranet/extranet/$1 [NC,L,QSA]
On the server, it returns 404:
The server can not find the requested page:
<IP-ADDRESS>/~extranet/extranet/dev/foo/
(port 80)
In fact, it seems any redirect fails, although phpinfo() lists mod_rewrite among the loaded modules.
The server is brand new. (In case it helps, the 404 page lists Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8 Server )
Where should i look for the mistake/misconfiguration?
UPDATE: more information
here is the file/folder structure and each .htaccess used:
<IP-ADDRESS>/~extranet/.htaccess (1)
<IP-ADDRESS>/~extranet/extranet/
L .htaccess (2)
L/dev/
L .htaccess (3)
L index.php
L/stable/
L .htaccess (3)
L index.php
(1) redirects all requests to folder "extranet" (2) redirects all requests not containing "/dev/" to folder "stable" (3) rewrites /extranet/foo/bar/ to index.php?app=foo&do=bar