Print Page | Close Window

Remove "index.php" from URL

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: PHP Discussion
Forum Description: Discussion and chat on PHP related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=31423
Printed Date: 29 November 2023 at 5:15am
Software Version: Web Wiz Forums 12.06 - https://www.webwizforums.com


Topic: Remove "index.php" from URL
Posted By: berhan
Subject: Remove "index.php" from URL
Date Posted: 13 November 2016 at 4:13pm
Hi,

I installed Wordpress to my hosting, and url's have "index.php" node that I want to remove. Is there any solution that you know?



Replies:
Posted By: WebWiz-Bruce
Date Posted: 14 November 2016 at 9:14am
If you are hosting your wordpress website with us here at Web Wiz you would need to setup some URL Rewrite Rules in your websites web.config file found in the your websites wwwroot folder.

Download the web.config file from your website and open it in notepad and locate the <system.webServer> section.

Add the following rewrite rules to the <system.webServer> section, save and then reupload your web.confug file;


<rewrite>
 <rules>
  <rule name="Main Rule" stopProcessing="true">
   <match url=".*" />
   <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
   </conditions>
   <action type="Rewrite" url="index.php" />
  </rule>
 </rules>
</rewrite>


If you get stuck open a support ticket from your Client Area account and we will add the rewrite rule for you.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.06 - https://www.webwizforums.com
Copyright ©2001-2023 Web Wiz Ltd. - https://www.webwiz.net