1

I have a site which use wired URL structure like:

http://www.example.com/course-detail.php?CourseId=NzI=&SubCategoryId=MQ==&DivisionId=MQ==

I would like to see the structure like:

http://www.example.com/course-details/course-name/

Note: The site is hosted on Windows server so .htaccess won't work to map URL.

Is there any other possibility to change this URL structure?

Thanks in advance.

S.I.
  • 3,250
  • 12
  • 48
  • 77

2 Answers2

1

Your site is hosted on windows server right? so .htaccsess will not work, because it work with Apache server, on windows server you have to use IIS server, so you need web.config.

i am already doing URL rewrite on windows server with core PHP,

try this web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
  <rules>
    <rule name="Imported Rule 1" stopProcessing="true">
      <match url="^.*$" />
      <conditions logicalGrouping="MatchAny">
      <add input="{REQUEST_FILENAME}" matchType="IsFile"  />
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory"  />
      </conditions>
      <action type="None" />
    </rule>
    <rule name="Imported Rule 2" stopProcessing="true">
      <match url="^.*$" />
      <action type="Rewrite" url="index.php" />
    </rule>
  </rules>
</rewrite>
</system.webServer>
</configuration> 
Archish
  • 850
  • 8
  • 32
-1

you must open the authority of httpd.conf of apache,find this,and change 'None' to 'All',all in httpd.conf must be changed,then restart the wampserver,and the .htaccess would be work

dongyang
  • 1
  • 1