I'm not try to hide my url. i just need to appear nice to my client. The URL that i'm trying to mask is: mysite.com/group/2
. It would be nice if that was mysite.com/client
. So, whenever my client hit his url mysite.com/client
the code behind would be from this url mysite.com/group/2
which group
is a module(folder/sources) and 2
is a primary id. I've tried using Rewrite mod/Apache(.htaccess), but i didn't succeed. How can i get this done? Any other way? Thanks
Here is the .htaccess
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# My Rewrite Rule
RewriteRule ^client$ group/2
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to 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 the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On
# @todo This may not be effective in some 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 your files in that mysite.com/group/2 try to place your file in this directory mysite.com/client in that directory write your code in index.php file that handles what your code is. this is what i did for my blog in my website