php - How to mask a URL -
i'm not try hide url. need appear nice client. url i'm trying mask is: mysite.com/group/2
. nice if mysite.com/client
. so, whenever client hit url mysite.com/client
code behind url mysite.com/group/2
group
module(folder/sources) , 2
primary id. i've tried using rewrite mod/apache(.htaccess), didn't succeed. how can done? other way? thanks
here .htaccess
<ifmodule mod_rewrite.c> options +followsymlinks rewriteengine on # rewrite rule rewriterule ^client$ group/2 # rid of index.php rewritecond %{request_uri} /index\.php rewriterule (.*) index.php?rewrite=2 [l,qsa] # rewrite directory-looking urls rewritecond %{request_uri} /$ rewriterule (.*) index.php?rewrite=1 [l,qsa] # try route missing files rewritecond %{request_filename} !-f rewritecond %{request_filename} public\/ [or] rewritecond %{request_filename} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$ rewriterule . - [l] # if file doesn't exist, rewrite index rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?rewrite=1 [l,qsa] </ifmodule> # sends requests /index.php/path/to/module/ "index.php" # acceptpathinfo on # @todo may not effective in cases fileetag size <ifmodule mod_deflate.c> addoutputfilterbytype deflate text/text text/html text/plain text/xml text/css application/x-javascript application/javascript </ifmodule>
instead of locating files in mysite.com/group/2 try place file in directory mysite.com/client in directory write code in index.php file handles code is. did blog in website
Comments
Post a Comment