Forum Moderators: phranque
# Internally rewrite all requested URLs to /public filepath unless already done
RewriteCond $1 !^public/
RewriteRule ^(.*)$ public/index.php?url=$1 [L]
# Internally rewrite all requested URLs to /public filepath unless already done
# Exclude by directory-path
RewriteCond $1 !^(public|images|css|js)/
# Exclude by filetype (optional)
RewriteCond $1 !\.(gif|jpe?g|png|bmp|ico|css|js)$
RewriteRule ^(.*)$ public/index.php?url=$1 [L]
http://www.example.com/mypage http://www.example.com/public/index.php?url=mypage http://www.example.com/css/global.css http://www.example.com/public/css/global.css http://www.example.com/mypage?id=235&action=edit http://www.example.com/public/index.php?url=mypage&id=235&action=edit