Pages

Showing posts with label .htaccess. Show all posts
Showing posts with label .htaccess. Show all posts

Tuesday, August 14, 2012

Change PHP.ini settings for file upload


php_flag file_uploads on

php_value post_max_size "8M"

php_value upload_max_filesize "8M"

php_value max_input_time "60"

Tuesday, July 24, 2012

Redirect using web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^DomainName\.com$" />
                    </conditions>
                    <action type="Redirect" redirectType="Permanent" url="http://www.DomainName.com/{R:1}" />
                </rule>
                <rule name="CanonicalHostNameRule1" stopProcessing="true">
                    <match url="index\.asp(?:l)?" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="DomainName\.com$" />
                    </conditions>
                    <action type="Redirect" url="http://www.DomainName.com/" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Tuesday, March 13, 2012

Redirect Using .htaccess

RewriteEngine On

rewritecond %{http_host} ^mydomain.com [nc]
rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc]


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.mydomain.com/ [R=301,L]


ErrorDocument 404 http://www.mydomain.com/404.htm

Saturday, September 3, 2011

IIS7 Url Rewrite Rules - solved

First create "httpd.conf" file on your root.
Than add the following code to the "httpd.conf" file.


RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

#Perform rewriting
RewriteRule ^(.*)$ index.php?p=$1 [NC,L]

Now You can write RewriteRule in the .htaccess file