I have a problem trying to hide .php extension from the url
I have been asked to hide it and because they are on a shared host i don't think i have access to .htacess so is there another way to hide it through a php function that i would call everytime an anchor is being selected?
.htaccess is what you would have access to on a shared server, as opposed to httpd.conf, which you wouldn't.
Put a .htaccess file in your document root with the following
FAIL
If your site stops loading, then you can use .htaccess :)
Of course, ^ that is a joke.
AllowOverride
is All
, although I generally write more obscure stuff : - Berry Langerak 2012-04-06 12:52
Is this truly about hiding .php
or is it more about having cleaner URLs?
If you truly can't access .htaccess
(i.e. your host has this turned off via AllowOverride None
) and assuming you also can't have your Apache conf settings updated for your VHost, the best you can do may be
http://example.com/page.php/my/clean/url
By default, Apache will send this URL to page.php
even with everything else after it. This is the most common way of creating "cleaner" URLs without access to mod_rewrite
.