The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hide php extension

Discussion in 'General Discussion' started by samuelmf, Nov 2, 2016.

  1. samuelmf

    samuelmf Well-Known Member

    Joined:
    May 22, 2006
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    158
    Location:
    Perú
    Hi mi friends

    It's possible access a file using variables without use the extension .php of the file

    By example y want to call my file like this:

    Actually it works as this: f.php?u=1321

    I want to do this: f?u=1312

    It's possible? yes? how?

    Thanks in advance
     
  2. Licensecart

    Licensecart Registered

    Joined:
    Feb 15, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I believe you can use this:
    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php
    In your .htaccess
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page