Wednesday, July 9, 2014

Redirect to domain without www.

redirection rule in .htaccess as follows

RewriteEngine on

# Redirect to domain without www.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule .* http://%1%{REQUEST_URI} [R=301,L]

Saturday, July 5, 2014

Git basic commands

This summary is not available. Please click here to view the post.

iis configuration for drupal clean-urls

web.config as follows

Drupal 6 :

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

    <configuration>

        <system.webServer>

            <rewrite>

                <rules>

                    <rule name="Drupal Clean URLs" stopProcessing="true">

                        <match url="^(.*)$" />

                        <conditions>

                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />

                         
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />

                        </conditions>

                        <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />

                    </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>


Drupal 7 :

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

<configuration>

 <system.webServer>

 <rewrite>

   <rules>

     <rule name="Drupal clean URLs" enabled="true">

       <match url="^(.*)$" ignoreCase="false" />

       <conditions logicalGrouping="MatchAll">

         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />

         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 

         <add input="{REQUEST_URI}" negate="true" pattern="/favicon.ico$" />

       </conditions>

       <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />

     </rule>

   </rules>

</rewrite>

    </system.webServer>

</configuration>