Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

web.config to .htaccess

Newbie Spellweaver
Joined
Feb 13, 2013
Messages
37
Reaction score
0
Hello,


I wanted to ask if someone could help me possibly this web.config convert into a .htaccess ?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <compilation debug="false" />
  </system.web>
  
  


  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="2300" />
    </connectionManagement>
  </system.net>


  <system.webServer>
    <httpErrors errorMode="Custom" existingResponse="Replace">
      <remove statusCode="403" />
      <error statusCode="403" responseMode="File" path="403.php" />
      <remove statusCode="404" />
      <error statusCode="404" responseMode="File" path="404.php" />
    </httpErrors>


    <rewrite>
      <rules>
        <rule name="Rule 1">
          <match url="^habbo-imaging/badge/([^/]+)" ignoreCase="false" />
          <action type="Rewrite" url="/habbo-imaging/badge.php?badge={R:1}" appendQueryString="false" />
        </rule>


        <rule name="Rule 2">
          <match url="^habbo-imaging/avatar/([^/]+)" ignoreCase="false" />
          <action type="Rewrite" url="habbo-imaging/avatarimage.php?figure={R:1}" appendQueryString="false" />
        </rule>


        <rule name="Rule 3">
          <match url="^habbo-imaging/avatarimage/([^/]+)" ignoreCase="false" />
          <action type="Rewrite" url="habbo-imaging/avatarimage.php?username={R:1}" appendQueryString="false" />
        </rule>


        <rule name="Rule 4">
          <match url="^habbo-imaging/head/([^/]+)" ignoreCase="false" />
          <action type="Rewrite" url="habbo-imaging/head.php?figure={R:1}" appendQueryString="false" />
        </rule>


        <rule name="Rule 5">
          <match url="^gamedata/habbopages/chat/commands" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/habbopages/chat/commands.txt" appendQueryString="false" />
        </rule>


        <rule name="Rule 6">
          <match url="^gamedata/habbopages/chat/options" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/habbopages/chat/options.txt" appendQueryString="false" />
        </rule>


        <rule name="Rule 7">
          <match url="^gamedata/supersecret" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/supersecret.php" appendQueryString="true" />
        </rule>


        <rule name="Rule 8">
          <match url="^gamedata/external_variables" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/external_variables.txt" appendQueryString="false" />
        </rule>


        <rule name="Rule 9">
          <match url="^gamedata/external_flash_texts" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/external_flash_texts.txt" appendQueryString="false" />
        </rule>


        <rule name="Rule 10">
          <match url="^gamedata/override/external_flash_override_texts" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/override/external_flash_override_texts.php" appendQueryString="false" />
        </rule>


        <rule name="Rule 11">
          <match url="^gamedata/override/external_override_variables" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/override/external_override_variables.txt" appendQueryString="false" />
        </rule>


        <rule name="Rule 12">
          <match url="^gamedata/figuredata" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/figuredata.xml" appendQueryString="false" />
        </rule>


        <rule name="Rule 13">
          <match url="^gamedata/productdata" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/productdata.txt" appendQueryString="false" />
        </rule>


        <rule name="Rule 14">
          <match url="^gamedata/furnidata_xml" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/furnidata.xml" appendQueryString="false" />
        </rule>
        
        <rule name="Rule 15">
          <match url="^gamedata/habbopages/forums" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/habbopages/forums.txt" appendQueryString="false" />
        </rule>


		<rule name="API - Default">
		  <match url="^api/([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
		  <action type="Rewrite" url="api.php?request={R:1}" appendQueryString="false" />
		</rule>	
		
		<rule name="API - Rooms">
		  <match url="^api/room/([0-9_-]+)(|/)$" ignoreCase="false" />
		  <action type="Rewrite" url="api.php?request=room&room_id={R:1}" appendQueryString="false" />
		</rule>	
		
		<rule name="API - Groups">
		  <match url="^api/group/([0-9_-]+)(|/)$" ignoreCase="false" />
		  <action type="Rewrite" url="api.php?request=group&group_id={R:1}" appendQueryString="false" />
		</rule>


		<rule name="API - Users">
		  <match url="^api/user/([a-zA-Z]+)/([a-zA-Z0-9_-]+)(|/)$" ignoreCase="true" />
		  <action type="Rewrite" url="api.php?request=user&search_type={R:1}&value={R:2}" appendQueryString="false" />
		</rule>		


		<rule name="API - Random Users with limit">
		  <match url="^api/users/([0-9]+)(|/)$" ignoreCase="false" />
		  <action type="Rewrite" url="api.php?request=users&amount={R:1}" appendQueryString="false" />
		</rule>	
		
        <rule name="HabboPages - Dynamic">
          <match url="^gamedata/habbopages/([0-9a-zA-Z]+)(|/)$" ignoreCase="false" />
          <action type="Rewrite" url="gamedata/habbopages/{R:1}.txt" appendQueryString="false" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>
 
Newbie Spellweaver
Joined
May 6, 2016
Messages
26
Reaction score
2


This will translate .htaccess -> web.config keeping both files. It reads it for it you and translates it.
 
Upvote 0
Back
Top