Hey, can you help me with convert the web.config to a .htacces file?

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<system.webServer>

<defaultDocument>
<files>
                <clear />
                <add value="index.php" />
                <add value="_seiten/index.html" />
                <add value="seite.php" />
</files>
</defaultDocument>

</system.webServer>
<system.webServer>
        <handlers>
            <clear />
            <add name="PHP53_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" resourceType="Either" />
            <add name="PHP54_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.4\php-cgi.exe" resourceType="Either" />
            <add name="PHP_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.6\php-cgi.exe" resourceType="Either" />
            <add name="PHP55_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe" resourceType="Either" />
            <add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
            <add name="TraceHandler-Integrated" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="WebAdminHandler-Integrated" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="AssemblyResourceLoader-Integrated" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="HttpRemotingHandlerFactory-rem-Integrated" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="HttpRemotingHandlerFactory-soap-Integrated" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" />
            <add name="AXD-ISAPI-2.0" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
            <add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
            <add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
            <add name="WebServiceHandlerFactory-ISAPI-2.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
            <add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
            <add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
            <add name="AXD-ISAPI-2.0-64" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
            <add name="PageHandlerFactory-ISAPI-2.0-64" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
            <add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
            <add name="WebServiceHandlerFactory-ISAPI-2.0-64" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
            <add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0-64" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
            <add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0-64" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
            <add name="CGI-exe" path="*.exe" verb="*" modules="CgiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
            <add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />
            <add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />
            <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
        </handlers>
    </system.webServer>
<system.webServer>

<rewrite>
<rules>

<rule name="HabboRE 1">
<match url="^index(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=index" />
</rule>

<rule name="HabboRE 2">
<match url="^home(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=home" />
</rule>

<rule name="HabboRE 3">
<match url="^ausloggen(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=logout" />
</rule>

<rule name="HabboRE 4">
<match url="^hotel(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=client" />
</rule>

<rule name="HabboRE 5">
<match url="^einstellungen(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=settings" />
</rule>

<rule name="HabboRE 6">
<match url="^community(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=community" />
</rule>

<rule name="HabboRE 7">
<match url="^neuigkeiten(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=neuigkeiten" />
</rule>

<rule name="HabboRE 8">
<match url="^neuigkeiten/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=neuigkeiten&amp;newsid={R:1}" appendQueryString="false" />
</rule>

<rule name="HabboRE 9">
<match url="^community/mitarbeiter(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=mitarbeiter" />
</rule>

<rule name="HabboRE 10">
<match url="^community/helfer(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=helfer" />
</rule>

<rule name="HabboRE 11">
<match url="^community/topuser(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=topuser" />
</rule>

<rule name="HabboRE 12">
<match url="^extras(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=extras" />
</rule>

<rule name="HabboRE 13">
<match url="^sicherheitslogin(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=sicherheitslogin" />
</rule>

<rule name="HabboRE 14">
<match url="^extras/zauberkarten(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=starbox" />
</rule>

<rule name="HabboRE 15">
<match url="^community/deejays(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=deejas" />
</rule>

<rule name="HabboRE 16">
<match url="^extras/badgeshop(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=badgeshop" />
</rule>

<rule name="HabboRE 17">
<match url="^adblocker-ausschalten(|/)$" ignoreCase="false" />
<action type="Rewrite" url="/templ/adblocker-ausschalten.html" />
</rule>

<rule name="HabboRE 18">
<match url="^account/disconnected(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=clienterror" />
</rule>

<rule name="HabboRE 19">
<match url="^community/casino(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=casino" />
</rule>

<rule name="HabboRE 20">
<match url="^extras/badgecreator(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=badgecreator" />
</rule>
<rule name="HabboRE 21">
<match url="^community/vorstand(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=vorstand" />
</rule>

<rule name="HabboRE 22">
<match url="^community/beziehungen(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=topbz" />
</rule>

<rule name="HabboRE 23">
<match url="^extras/buydia(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=buydia" />
</rule>

<rule name="HabboRE 24">
<match url="^extras/buyvip(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=buyvip" />
</rule>

<rule name="HabboRE 25">
<match url="^client_gateway(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=client_gateway" />
</rule>

<rule name="HabboRE 26">
<match url="^community/werbeteam(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=werbeteam" />
</rule>

<rule name="HabboRE 27">
<match url="^extras/preisliste(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=preisliste" />
</rule>

<rule name="HabboRE 28">
<match url="^regelwerk(|/)$" ignoreCase="false" />
<action type="Rewrite" url="seite.php?seite=regelwerk" />
</rule>

</rules>
</rewrite>
</system.webServer>
</configuration>

Recommended Answers

All 4 Replies

Help pls :o

There are a whole lot of projects that are attempting to do this. I suggest you try one of the options in this Google search:

https://www.google.com/search?q=convert+web.config+to+htaccess&oq=con&aqs=chrome.3.69i57j69i61j69i60j69i59j69i65l2.1719j0j7&sourceid=chrome&ie=UTF-8

But, that's a pretty darn big web.config. I'm going to bet that you're still going to have to do a lot of manual cleanup. Why not start from scratch using the original web.config as a guide?

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.