SpyLoaded Forum

Science/Technology/Business/Editoria => Art, Graphics Designs => Webmasters Board => Topic started by: Mr. Babatunde on July 19, 2025, 12:48:31 AM

Title: Remove Index From URL Page
Post by: Mr. Babatunde on July 19, 2025, 12:48:31 AM
Create a file name func. php >> Paste this code in the func. php file

Code: [Select]
<?php
if (strpos($_SERVER[&#39;REQUEST_URI&#39;],&#39;index.php&#39;) !== FALSE )
{
    
$new_uri preg_replace(&#39;#index\.php\/?#&#39;, &#39;&#39;, $_SERVER[&#39;REQUEST_URI&#39;]);
    
header(&#39;Location: &#39;.$new_uri, TRUE, 301);
    
die();
}


?>


Step2:

* Create a folder name about-us
* Open the new folder you created.
* Inside this folder , Create new file name index. php
* Open the new file index you just created.
* Copy & Paste this code at line 1 (first line)

Code: [Select]
<?php include ("../func.php"); ?>
SimplePortal 2.3.6 © 2008-2014, SimplePortal