How can I remove index.php after slash from my url?


Before in my site’s url after the forward slash index.php was not shown like Recently, I worked in .htaccess. Now, I see that if I type my url at address bar, the index.php also showen like But i only typed at address bar.

Can you tell me what I need to hide the index.php after slash?

Thank you

I don’t understand why people still insist on doing this. Every time I’ve had to deal with a website that redirects to a slash for the index, rewrites have become increasingly complicated as time goes on. Not to mention I end up having to solve problems like this when someone changes something on their own.

I started doing the exact opposite on my sites, 301 redirecting a bare slash to /index.html, a couple of years ago. I’ve had zero instances where I had to tip-toe around previous redirects since I switched to doing it this way.

We will definitely need to see what is going on in your .htaccess file before any recommendations can be made.

If you could provide this or a pastebin of it, that would be great.

May be [R] is there in your rewrite rule. Remove it and see. Better you paste your htaccess content here.

Check last para on this to debug htaccess

If you can show your .htaccess code, it will be very easy to tell.

RewriteRule xxx /index.php [L]

Like above statement you might be specified /index.php. Please change that to /
Then it will fix your problem.