homepage Welcome to WebmasterWorld Guest from 54.161.220.160
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

5+ Year Member



 
Msg#: 4189331 posted 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

5+ Year Member



 
Msg#: 4189331 posted 9:15 am on Aug 20, 2010 (gmt 0)

Can anyone help me with these redirect rules?

Anyango

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4189331 posted 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

5+ Year Member



 
Msg#: 4189331 posted 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