php - Need help on Mod Rewrite .htaccess parent folder and 1 subfolder -
i not on understand .htaccess rewrite, , 1 give me headache.
i have domain.com
, , 1 folder called: app/webroot/
i want everything:
domain.com/*
rewrite folderdomain.com/app/webroot/*
then make me crazy. have 1 folder admin, called
"system"
under domain.com too. under domain.com/system not rewrite webroot.and finally, want
system/something
rewrite/system/index.php?subpage=something
really sorry if guy think easy , can not it, stuck whole days already.
here have tried do:
rewriteengine on rewriterule ^(.*)$ app/webroot/$1 [l] rewritecond %{request_filename} -s [or] rewritecond %{request_filename} -l [or] rewritecond %{request_filename} -d rewriterule ^.*$ - [nc,l] rewriterule ^/?(system)/?([^/]+)/?$ /system/index.php?subpage=$1 [nc,l,qsa] rewriterule ^/?(system)/?([^/]+)/([^/]+)/?$ /system/index.php?subpage=$1&action=$2 [nc,l,qsa] rewriterule ^/?(system)/?([^/]+)/([^/]+)/([^/]+)/?$ /system/index.php?subpage=$1&action=$2¶m=$3 [nc,l,qsa]
nvm, got it.
rewriteengine on rewritecond %{request_filename} -s [or] rewritecond %{request_filename} -l [or] rewritecond %{request_filename} -d rewriterule ^.*$ - [nc,l] rewriterule ^(.*)$ app/webroot/$1 [l] rewriterule ^/?(system)/?([^/]+)/?$ /system/index.php?subpage=$2 [nc,l,qsa] rewriterule ^/?(system)/?([^/]+)/([^/]+)/?$ /system/index.php?subpage=$2&action=$3 [nc,l,qsa] rewriterule ^/?(system)/?([^/]+)/([^/]+)/([^/]+)/?$ /system/index.php?subpage=$2&action=$3¶m=$4 [nc,l,qsa]
Comments
Post a Comment