خرید بک لینک
سلام دوستان
خسته نباشید
چطور می تونم این فایل webconfig برای IIS رو به htaccess تبدیل کنم؟
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                            <rule name="Redirect All" stopProcessing="true">
                                     <match url=".*" />
                                   <action type="Rewrite" url="/index.php" />
                                   <conditions>
                                         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                                          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                                     </conditions>
                                </rule>
            </rules>
        </rewrite>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
    <system.web><httpRuntime executionTimeout="300"/></system.web>
</configuration>

تشکر

no pain, no gain

تشکر شده توسط:


<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>
TimeOut 300
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,NC,QSA]

تشکر شده توسط:

مرسی تا اینجا خیلی خوب شد
یه سری شرط توی فایل index هست که فک کنم اونها رو باید جزء استثنا قرار بدم، قسمتی از فایل index :
....

/* check if it is a webshop */
if($request->Param(0) == 'webshop')
{
require_once('webshop.php');
}
/* check if it is a admin */
elseif($request->Param(0) == 'admin')
{
if(Auth::Instance()->getLevel() >= 8) {
require_once('admin.php');
}else {
$url = Config::Instance()->defaults->login . '?redirect=' . $request->getFullUrl();
header('Location: ' . $url );
} 
}

....

مثلا اگه admin توی url باشه اونو خودش require می کنه، این کد رو به htaccess اضافه کردم ولی تاثیر نداشت:

کد:

RewriteRule ^admin/?$ [L,NC]


ممنون می شم اینم راهنمایی کنید تا درستش کنم.

no pain, no gain

تشکر شده توسط:

برچسب: تبدیل htaccess به web config, نویسنده: خنجی تاريخ: پنجشنبه 8 مهر 1395 ساعت: 10:40

صفحه بندی