Posts Tagged ‘file extension’

Hide .php extension with url rewriting using .htaccess

Last time I've written an article about hiding php file extension where I've showed you how you can use .html or .asp extension of file instead of .php extension. But there was one flaw in that technique you have had to change the file extension explicitly but in this post I'm going to show you how to rewrite the URL instead of renaming the file extension Using this technique you will see product.html in the address bar of the browser but the actual file name remains product.php and you don't need to rename the file extension. Furthermore you can rewrite the URL like product.php?id=5 to product-5.html. Full story

Getting filename and extension in PHP using explode() ,basename() and pathinfo()

Getting the extension from a file name or name of the file from the full path is not a big hassle for the experienced programmer but it might be a annoying task for the beginners of PHP. Now let me find the solution for them using two functions of PHP called explode() and pathinfo(). Full story

Hiding PHP file extension

Do you want to hide your web site's server script identity ? If you don't want to reveal the programming language ( server side script ) of your website to visitors of website so that any hacker or spammer will not be able to intrude or inject any code in your website. Here is a small technique for you, you can use .html or .asp file to work as a php file i.e. use .asp or .html extension instead of .php. You just need to create a .htaccess file and put the following code in the .htaccess file. Remember that the .htaccess file should be placed in the root folder of your website. Full story
Copyright © 2014 Roshan Bhattarai's Blog. All rights reserved.
Powered by WordPress.org, Custom Theme and ComFi.com Calling Card Company.