Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有人可以将此web.config转换为.htaccess吗?_.htaccess_Web Config_Osticket - Fatal编程技术网

有人可以将此web.config转换为.htaccess吗?

有人可以将此web.config转换为.htaccess吗?,.htaccess,web-config,osticket,.htaccess,Web Config,Osticket,我需要以下web.config文件在Apache服务器中执行。这是OSTicket系统的web.config文件 或者任何人都可以带我找到一份 提前谢谢 <system.webServer> <directoryBrowse enabled="false" /> <rewrite> <rules> <rule name="HTTP api" stopProcessing="true"&g

我需要以下web.config文件在Apache服务器中执行。这是OSTicket系统的web.config文件

或者任何人都可以带我找到一份

提前谢谢

<system.webServer>
    <directoryBrowse enabled="false" />
    <rewrite>
        <rules>
            <rule name="HTTP api" stopProcessing="true">
                <match url="^(.*/)?api/(.*)$" ignoreCase="true"/>
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile"
                        ignoreCase="false" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory"
                        ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="{R:1}api/http.php/{R:2}"/>
            </rule>
            <rule name="Site pages" stopProcessing="true">
                <match url="^(.*/)?pages/(.*)$" ignoreCase="true"/>
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile"
                        ignoreCase="false" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory"
                        ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="{R:1}pages/index.php/{R:2}"/>
            </rule>
        </rules>
    </rewrite>
    <defaultDocument>
        <files>
            <remove value="index.php" />
            <add value="index.php" />
        </files>
    </defaultDocument>
</system.webServer>

试试:

DirectoryIndex index.php

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*/)?api/(.*)$ /$1api/http.php/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*/)?pages/(.*)$ /$1pages/index.php/$1 [L]