homepage Welcome to WebmasterWorld Guest from 50.19.169.37
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
mod rewrite rule to redirect to public folder
Mvc
migthegreek




msg:4189333
 3:53 pm on Aug 19, 2010 (gmt 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.

 

migthegreek




msg:4189656
 9:15 am on Aug 20, 2010 (gmt 0)

Can anyone help me with these redirect rules?

Anyango




msg:4189695
 10:31 am on Aug 20, 2010 (gmt 0)

try posting this in Apache forum, peple like jdMorgan can help you on this in the blink of an eye

migthegreek




msg:4189711
 11:48 am on Aug 20, 2010 (gmt 0)

OK thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved