
January 22nd, 2012, 09:21 AM
|
|
|
|
mod_rewrite - Load from a subdirectory
Hi all,
I'm having trouble with a mod_rewrite case. I have the following .htaccess file in the main web directory:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /myproject
RewriteRule ^$ views/ [L]
RewriteRule (.*) views/$1 [L]
</IfModule>
What I'm trying to do, is when a user requests a page of the form http://www.mysite.com/myproject/whatever, it loads http://www.mysite.com/myproject/views/whatever.
But when I try the code presented above, I get a 404.
So what am I doing incorrectly?
|