How to hide .php extension in your website…?

How to hide .php extension in your website…? - Hallo sahabat Tutorials, Pada Artikel yang anda baca kali ini dengan judul How to hide .php extension in your website…?, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.

Judul : How to hide .php extension in your website…?
link : How to hide .php extension in your website…?

Baca juga


How to hide .php extension in your website…?

How    to     hide      .php      extension in    your    website…?
(1)First  of   all  type following code  save  file    as   .htaccess   into   your  website project folder..
Code is given below:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ $1\.php

and use  following code with above if you want to hide both .html  as well as .php extension


RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ $1\.php

RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html

(2)now   see given example for  to check it..
(a)Now   write code given below   and save   it   for test.php file:
<html>
<body>
<h1>hello world</h1>
<a href="test1">click here </a>
</body>
</html>

(b)Now   write   code    given   below   for    test1.php     file   :
<html>
<body>
<h1>hello world</h1>
<a  href="test">click here </a>
</body>
</html>

Now   run it    on   your  server   instead   of    test.php    if you will just type   test 

For example  instead of  “Localhsot/test.php “   we can use  “Localhost/test”  only to run your php files without extension..


Demikianlah Artikel How to hide .php extension in your website…?

Sekianlah artikel How to hide .php extension in your website…? kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.

Anda sekarang membaca artikel How to hide .php extension in your website…? dengan alamat link https://othereffect.blogspot.com/2016/02/how-to-hide-php-extension-in-your.html

0 Response to "How to hide .php extension in your website…?"

Post a Comment