[SOLVED] Simple .htaccess Redirect Not Functioning as Expe..

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

[SOLVED] Simple .htaccess Redirect Not Functioning as Expe..

Post by Jonah Bron »

(Never mind, it's fixed now, kinda weird)

Hello, world!

I'm working on my blog, and I'm trying to employ the model-view-controller programming framework. I'd like to put all of the actual public files into /public, not / . Simple, right? So I whipped up a quick .htaccess file (something I'm new to) like this:
[text]
RewriteEngine on
RewriteRule ^(.*)$ public/index.php?passed=$1[/text]
The function is relatively obvious. Everything is sent to public/index.php in the "passed" get field. But it doesn't work. I set index.php to output whatever came in "passed", and it reads "public/index.php".

Thanks in advance.
Post Reply