Home  >  Q&A  >  body text

How Apache automatically hides index.php

The .htaccess file has been set up

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php/ [QSA,PT,L]
</IfModule>

When accessing index.php/xxx, I still access it as usual. It will not become an address like /xxx. If I want index.php/xxx, it will automatically jump to /xxx. How to deal with it?

巴扎黑巴扎黑2713 days ago490

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 17:02:23

    DocumentRoot where RewriteBase/index.php is located, put .htaccess here

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?$1 [QSA,PT,L]

    reply
    0
  • Cancelreply