Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Removing index.php from part of URL

I'm using codeigniter framework for my site.

The url of the framework is

http://{hostname}/index.php/{class}/{function} .

In local, we have php -S {hostname}:{port} where the url will be changed into

http://{hostname}:{port}/{class}/{function} .

The latter will prevent access to directories either, since the only accessed file is index.php.

Is there any method to implement this feature in Infinityfree?

Comments

  • edited June 11

    @OrcaFrost
    Do you mean removing the .php in the end?
    I am not so sure if the thing you ask, if there is any way, but since your website has only the index.php that means that this is what your visitors will see when they visit your website's raw address.

  • edited June 11

    hi
    https://www.codeigniter.com/user_guide/general/urls.html

    .htaccess file
    Disable Directory Listings in this Directory and Subdirectories
    This will hide the files from the public unless they know direct URLs
    Options -Indexes

  • @ChrisPAR : I mean omitting the index.php part. The actual website is still in local.

    @OxyDac : Thank you. I missed about that part.

  • edited June 11

    @OrcaFrost said:
    I'm using codeigniter framework for my site.

    The url of the framework is

    http://{hostname}/index.php/{class}/{function} .

    In local, we have php -S {hostname}:{port} where the url will be changed into

    http://{hostname}:{port}/{class}/{function} .

    The latter will prevent access to directories either, since the only accessed file is index.php.

    Is there any method to implement this feature in Infinityfree?

    You’re going to need to do some homework on .htaccess because .htaccess will control your entire URL methodologies. So, in order to design your .htaccess to your own personal needs you’re going to have to figure that out on your own.

This discussion has been closed.