Welcome to WebmasterWorld Guest from 54.226.133.245

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

mod rewrite rule to redirect to public folder

Mvc

     
3:53 pm on Aug 19, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2008
posts:64
votes: 0


I'm having trouble writing the htaccess rewrite rules for an MVC pattern, so that all requests get redirected to a public folder.

http://www.example.com should go to http://www.example.com/public/index.php

http://www.example.com/mypage should go to
http://www.example.com/public/index.php?url=mypage

And requests for images, JS, CSS, etc. should be like:

http://www.example.com/css/stylesheet.css but really goes to http://www.example.com/public/css/stylesheet.css

Can someone please suggest appropriate rules for this? I'm getting infinite redirects mainly.
9:15 am on Aug 20, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2008
posts:64
votes: 0


Can anyone help me with these redirect rules?
10:31 am on Aug 20, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 24, 2005
posts:697
votes: 0


try posting this in Apache forum, peple like jdMorgan can help you on this in the blink of an eye
11:48 am on Aug 20, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2008
posts:64
votes: 0


OK thanks