I have a website and I want to change the index.php and it is not working each time I add htaccess file code it will stop me from loging in as admin.

The htaccess file applies to the directory where the file is located and all subdirectories under it. You can use instructions in. The htaccess file can redirect requests to different URLs, control directory listings, specify custom error documents, etc.

See THIS similar question asked, and follwo links.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.