php - Static Url of a web application -
my web application url http://www.example.com
now want end user see http://www.example.com in there
browser inseted of http://www.example.com/index or thing after / not show end user
i.e http://www.example.com/abc.php?id='someid'
will display in user browser http://www.example.com
thank in advance , sorry bad english.....
there several ways that. rest web service, url shortening, changing alias or creating .htacces file.
an easy way creating .htaccess file in root directory.
if you’re running apache, can creating redirect in site’s .htaccess file. if don’t have one, create new file called “.htaccess” in site’s web root.
save inside .htaccess file:
<ifmodule mod_rewrite.c> rewriteengine on # send would-be 404 requests craft rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php?/$1 [l] </ifmodule>
that rewrite rule says, “if request coming in doesn’t map existing folder or file, pass along index.php instead.”
source http://buildwithcraft.com/help/remove-index.php
and check htaccess remove index.php url
Comments
Post a Comment