Some mod_rewrite insight

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Had a quick question with some rules that I'm having a bit of difficulty with.

Essentially I'm hosting a web application which follows the MVC design
pattern which relies on some mod_rewrite ninja in order to setup
proper internal routing.  The base of the ruleset that gets the
application bootstrapped looks like the following:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Straightforward.

I'm trying to introduce an additional rule that maps the following:

http://foo.example.com that reads the following http://www.example.com/foo

Unfortunately the only difficulty with the above, is
http://www.example.com/foo is the URL that works after inheriting the
rules I stated above, as it needs to route through index.php.  I've
tried something to this extent:

    RewriteCond %{HTTP_HOST} ^foo\.example\.com$ [NC]
    RewriteRule . /index.php/foo [L]

This is causing status 500, etc.

If anyone has any suggestions, or wants to see snippets from
rewrite.log, perhaps that can work. If you see a straight out error,
that would help me a lot.

Thanks all.

/sf

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux