No file appears in the cropping bar

0

How do I display only the folder in the address bar, eg:

  

www.teste.com.br/admin

When it looks like this:

  

www.teste.com.br/admin/index.php

    
asked by anonymous 22.12.2016 / 13:58

1 answer

0

Enable mod_rewrite in Apache, usually already enabled.

Use the following command:

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^admin/?$ admin/index.php [NC,L]
</IfModule>

In RewriteRule you tell the server that when the URL www.yourdomain.com/admin is accessed it should be interpreted as www.yourdomain.com/admin/index.php

Here the same question with htaccess and IIS Masking url path on IIS server

You can find more complex examples on the workings of friendly URLs link

    
22.12.2016 / 14:02