« Previous Next »

Thread: Images / CSS / files not visible/reachable

Last post 02-27-2009 6:18 AM by keith_stylux. 13 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (14 items)

Sort Posts:

  • 02-18-2009, 2:30 PM

    Images / CSS / files not visible/reachable

    Good evening all, first of all i'm pretty new at this and only have a basic knowledge about the subject. Sorry for that, so please be gentle.

    1st of all we delvelopen a website with CMS on a local machine (apache xampp) After testing it on a linux server the website looks like it supposed too. 

    But now the site needs to be up and running on a windows IIS7 server, I asked the webhosting provider to install the Rewrite-module. He also converted our .htacces file.

    During the conversion there was 1 note "RewriteBase not supported" or something.

    All the clean url's work perfectly now. (even multilanguage nl(dutch) en (english).

    The issue:

    The site doesnt seem to display the CSS or images. It's also not possible connecting to them directly using for examp. www.mysite.com/css/style.css or www.mysite.com/images/screen.jpg

    When i try this, simply nothing happends.

    I really hope someone could help me with this issue. I really don't know where to look.

    So basically i cannot reach files others than index.php 

     

     Thanks in Advance

     

    This is the original .htacces file

    _______________________________________________________________________

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(?:(en|nl)\/?)?([-a-z0-9_\/]+\/?)?$                index.php?language=$1&path=$2&%{QUERY_STRING}    [L,NC]
    </IfModule>

    # BEGIN ImageResizing
    <ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    # scaling small_thumb, thumb, klein, normaal
    RewriteRule ^thumb/([A-Za-z0-9/_-]+).(jpeg|jpg|JPG|JPEG|gif|png)$ images.php?max_width=175&max_height=240&imgfile=$1.$2
    RewriteRule ^right/([A-Za-z0-9/_-]+).(jpeg|jpg|JPG|JPEG|gif|png)$ images.php?max_width=260&max_height=350&imgfile=$1.$2
    RewriteRule ^normal/([A-Za-z0-9/_-]+).(jpeg|jpg|JPG|JPEG|gif|png)$ images.php?max_width=640&max_height=640&imgfile=$1.$2

    RewriteCond %{HTTP_HOST} ^/ [NC]
    RewriteRule ^(.*)$ /nl/$1 [L,R=301]

    </ifmodule>
    # END ImageResizing

     

    The result of the conversion

    _________________________________________________________________

     

            <rewrite>

                <rules>

                    <rule name="Imported Rule 1" stopProcessing="true">

                        <match url="^(?:(en|nl)\/?)?([-a-z0-9_\/]+\/?)?$" />

                        <action type="Rewrite" url="index.php?language={R:1}&amp;path={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />

                    </rule>

                    <rule name="Imported Rule 2">

                        <match url="^thumb/([A-Za-z0-9/_-]+).(jpeg|jpg|JPG|JPEG|gif|png)$" ignoreCase="false" />

                        <action type="Rewrite" url="images.php?max_width=175&amp;max_height=240&amp;imgfile={R:1}.{R:2}" appendQueryString="false" />

                    </rule>

                    <rule name="Imported Rule 3">

                        <match url="^right/([A-Za-z0-9/_-]+).(jpeg|jpg|JPG|JPEG|gif|png)$" ignoreCase="false" />

                        <action type="Rewrite" url="images.php?max_width=260&amp;max_height=350&amp;imgfile={R:1}.{R:2}" appendQueryString="false" />

                    </rule>

                    <rule name="Imported Rule 4">

                        <match url="^normal/([A-Za-z0-9/_-]+).(jpeg|jpg|JPG|JPEG|gif|png)$" ignoreCase="false" />

                        <action type="Rewrite" url="images.php?max_width=640&amp;max_height=640&amp;imgfile={R:1}.{R:2}" appendQueryString="false" />

                    </rule>

                    <rule name="Imported Rule 5" stopProcessing="true">

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

                        <conditions logicalGrouping="MatchAll">

                            <add input="{HTTP_HOST}" pattern="^/" />

                        </conditions>

                        <action type="Redirect" url="/nl/{R:1}" redirectType="Permanent" />

                    </rule>

                </rules>

            </rewrite>

  • 02-23-2009, 1:20 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Images / CSS / files not visible/reachable

    The regular expression that you have in "Imported Rule 1" is too broad, i.e. it always matches. This causes two things: 1. None of the subsequent rules are ever executed. 2. It rewrites the requests for css and image files to index.php.

    To fix that you can do the following:

    1. Add the following conditions to the "Imported Rule 1":

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

    This will cause to rule to not execute for css and image files.

    2. Move the "Imported Rule 1" to the end of the rules list.

    http://ruslany.net
  • 02-24-2009, 11:13 AM In reply to

    Re: Images / CSS / files not visible/reachable

     Great, it works! Tough i bounced into the problem to only acces it by directly connecting to:

    http://mywebsite.com ( in this situation it works perfectly)

    but when i type in my url bar:

     www.mywebsite.com i get no acces to my webpage. (www in front doest give me acces)

    I tried to figure this out together with my hosting company how to solve this "www" problem. He's aslo kinda new with the module. He suggested a quickfix ( index.html redirect  to http://mywebsite.com) this cant be the proper way to do it i guess?

     Please hope you guys can help me again, will try not to bother again :P

     Thanks again for the great help!

     

    My rules so far: dir "backend" is for the CMS

     

                <rules>
                    <clear />
                    <rule name="Imported Rule 1" enabled="true" stopProcessing="true">
                        <match url="^(?:(en|nl)\/?)?([-a-z0-9_\/]+\/?)?$" negate="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="^/backend/" />
                        </conditions>
                        <action type="Rewrite" url="index.php?language={R:1}&amp;path={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 1-1" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 2" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([0-9]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;{R:1}:p={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 3" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([a-z_]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;action={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 4" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([a-z_]+)/([0-9]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;action={R:2}&amp;id={R:3}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>               
                </rules>

            </rewrite>

     

  • 02-24-2009, 1:00 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Images / CSS / files not visible/reachable

    It looks like your web site does not have binding to www.mywebsite.com host header. That is unrelated to URL rewriter and I do not think that solution with index.html redirect will help here. Here is the screenshot of how site bindings are configured in IIS 7 (http://learn.iis.net/Content_Cache/470/Site%20bindings.png). You need to make sure that your site has two site bindings: one that uses host header value mywebsite.com and another one that uses www.mywebsite.com .

    http://ruslany.net
  • 02-26-2009, 6:46 AM In reply to

    Re: Images / CSS / files not visible/reachable

     Thanks again for your quick help ruslany, I had a conversation with my hosting provider and all the site bindings where like the screenshot you provided.

    Maybe I misexplained; what i meant was when I approach my website www.mysite.com or mysite.com i want it to automatically go to www.mysite.com/nl/

    How can i achieve this ? hope you can help again, would be great!

     Thanks in advance!

  • 02-26-2009, 1:07 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Images / CSS / files not visible/reachable

    If you want to always do a redirect to www.mysite.com/nl/ then you can use this rule:

    <rule name="Redirect" stopProcessing="true">
            <match url="(.*)" />
              <conditions>
                            <add input="{URL}" negate="true" pattern="^/nl/?" />
               </conditions>
            <action type="Redirect" url="http://www.mysite.com/nl/{R:1}" redirectType="Permanent" />
    </rule>

    http://ruslany.net
  • 02-26-2009, 5:35 PM In reply to

    Re: Images / CSS / files not visible/reachable

     Thanks Ryslan,

    Great succes!

    My first try was putting it in as the 1st rule without succes, after replacing it, and placing it as the second rule it works perfectly. Thanks again for everything. Now I can finally enjoy my ISS7 hosting services.

    Hope I didnt bother you too much ;)

    For everyone else this is how it looks like:

     

    _________________________________________________________________


            <rewrite>

                <rules>


                    <clear />
                    <rule name="Imported Rule 1" enabled="true" stopProcessing="true">
                        <match url="^(?:(en|nl)\/?)?([-a-z0-9_\/]+\/?)?$" negate="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="^/backend/" />
                        </conditions>
                        <action type="Rewrite" url="index.php?language={R:1}&amp;path={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>

    <rule name="Redirect" stopProcessing="true">
            <match url="(.*)" />
              <conditions>
                            <add input="{URL}" negate="true" pattern="^/nl/?" />
               </conditions>
            <action type="Redirect" url="http://www.venled.nl/nl/{R:1}" redirectType="Permanent" />
    </rule>

                    <rule name="Imported Rule 1-1" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 2" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([0-9]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;{R:1}:p={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 3" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([a-z_]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;action={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 4" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([a-z_]+)/([0-9]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;action={R:2}&amp;id={R:3}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>               
                </rules>

            </rewrite>

     

  • 02-26-2009, 6:05 PM In reply to

    Re: Images / CSS / files not visible/reachable

     Sorry I was celebrating too soon :(

    Well the redirect as show above works perfectly when i type www.mysite.com, it shows the website in it's full richness. images/css everything.

    But when i click an internal link and the browser goes to another page for example
    www.mysite.com/news suddenly all the images and css dissapear?

    really don't know whats happening.... really tought i had it?

    Can you please tell me how to rule would look like in the full context? what am i doing wrong?

    Thanks in Advance.

  • 02-26-2009, 6:28 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Images / CSS / files not visible/reachable

    Can you open the source HTML in the browser and give an example of the image URL or CSS file that did not load?

    http://ruslany.net
  • 02-26-2009, 8:05 PM In reply to

    Re: Images / CSS / files not visible/reachable

    Hi thanks for the quick reply ;)

    I putted back the setup as shown above.


    The website (HTML source) can be viewed on
    www.venled.nl (i will leave the setup for a couple hours like this cause tomorrow morning the site needs te be live again)

    Everything is working normal until i write the rewriterules as shown above.
    Everything basically works fine until i try to redirect to www.venled.nl/nl/

     Alle images in HTML are shown, CSS and background-images (CSS) are not showed.
    <link rel="stylesheet" media="screen" type="text/css" href="/_css/style.css" />

     

    Hope you can help thanks again ryslany! Great help!


     

     

     

     

     

    __________________________________________________________________________

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="nl">
    <head>

    <title>VenLed - LED-verlichting Venlo - Importeur, groothandel en leverancier</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta name="robots" content="noarchive" />
    <meta name="language" content="nl" />
    <meta name="keywords" content="LED, LED-verlichting, importeur, leverancier, groothandel, toebehoren, accessoires, Venlo, VenLed" />
    <meta name="description" content="VenLed - LED-verlichting Venlo - Importeur, groothandel en leverancier. VenLed is specialist op het gebied van decoratieve, energiezuinige, robuuste, duurzame en waterbestendige LED-verlichting. VenLed levert door heel Nederland." />
    <meta name="robots" content="index,follow" />
    <link rel="shortcut icon" href="/_img/favicon.ico" />
    <link rel="stylesheet" media="screen" type="text/css" href="/_css/style.css" />
    <link rel="stylesheet" media="screen" type="text/css" href="/_css/slideshow.css" />
    <link rel="stylesheet" media="print" type="text/css" href="/_css/print.css" />
    <script src="/_js/jquery-1.3.1.min.js" type="text/javascript"></script>
    <script src="/_js/corners.js" type="text/javascript"></script>
    <script src="/_js/serialscroll.js"type="text/javascript" ></script>
    <script src="/_js/scrollto.js" type="text/javascript"></script>
    <script src="/_js/init.js" type="text/javascript"></script>
    <script src="/_js/dropdown.js" type="text/javascript"></script>

    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="/_css/ie6.css" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="/_css/ie7.css" /><![endif]-->

    </head>
    <body onload="load()" onunload="GUnload()">
    <div id="wrapper">
    <a href="/" title="VenLed LED-verlichting"><img src="/_img/VenLed-led-verlichting-venlo.gif" alt="VenLed LED-verlichting" class="logo" /></a>
    <div id="navigatie_language">

    <p>LANGUAGE: <strong>NL</strong> / <a href="/en/" title="VenLed English">ENG</a></p>
            

    </div>
    <div id="navigatie_bar">

    <ul>
    <li><a href="/" title="Home">Home</a></li>
    <li><a href="/nl/over-venled/" title="Over VenLed">Over VenLed</a></li>
    <li><a href="/nl/producten/" title="Producten">Producten</a></li>
    <li><a href="/nl/vacatures/" title="Vacatures">Vacatures</a></li>
                <li><a href="/nl/nieuws/" title="Vacatures">Nieuws</a></li>
    <li><a href="/nl/contact/" title="Contact">Contact</a></li>
    </ul>


    </div>

    <div id="left_column">
    <div id="showreel">
    <div id="screen2">
                    <div id="buttons">
    <a class="next" href="#"></a>
    <a class="prev" href="#"></a>
    </div>
    <div id="slideshow">
    <ul>
    <li><img src="/_img/Decoratieve-LED-Strips-Verlichting.jpg" alt="Decoratieve LED-strips LED-verlichting" /></li>
    <li><img src="/_img/Kantoor-LED-Verlichting-Energie-zuinig.jpg" alt="Energie zuinige LED-verlichting voor in uw kantoor" /></li>
    <li><img src="/_img/LED-Bulbs-Peer-Verlichting-Energie-zuinig.jpg" alt="Energie zuinige LED bulbs / peer" /></li>
                            <li><img src="/_img/Kantoor-LED-T8-Verlichting-Energie-zuinig.jpg" alt="Energie zuinige kantoor verlichting" /></li>
    <li><img src="/_img/LED-Verlichting-Energie-zuinig.jpg" alt="Energie zuinige LED-verlichting" /></li>
    <li><img src="/_img/Decoratieve-LED-Verlichting.jpg" alt="Decoratieve LED-verlichting" /></li>
    </ul>
    </div>
    </div>
    </div>

    <div id="introhome">
    <div class="content">

    <h1>VenLed LED-verlichting Venlo</h1>
                    <p>VenLed is een solide importeur en leverancier van kwalitatief hoogwaardige LED-verlichting. Het bedrijf rust op veel kennis en ervaring in de LED-branche. In Europa en daarbuiten fungeert VenLed als groothandel voor klanten zoals: interieurbouwers, installateurs, standbouwers, architecten en doorleveranciers van <a href="http://www.venled.nl/nl/producten">LED-producten</a>.</p>
    <p>VenLed wil geen concurrent zijn van haar klanten. Wij leveren dus niet rechtstreeks aan consumenten en werken niet op projectbasis. Dit is een bewuste keuze. Op deze manier onderscheiden wij ons namelijk van andere leveranciers van LED-verlichting. Wij zijn van mening dat een importeur marktruimte moet geven aan haar eigen klanten, zodat deze vrij kunnen opereren. Op deze manier willen wij een betrouwbare partner zijn van klanten die zich blijvend aan ons binden. Daarnaast onderscheidt VenLed zich in het bijzonder door middel van een optimale prijs/kwaliteit verhouding. Waar veel klanten hoge prijzen gewend zijn voor eenzelfde kwaliteit, vraagt VenLed de meest scherpe prijs.</p>
    <p>Venled biedt U momenteel 4 verschillende <a href="http://www.venled.nl/nl/producten">productlijnen</a>; <a href="http://www.venled.nl/nl/producten/decoline">Decoline</a> (decoratief), <a href="http://www.venled.nl/nl/producten/ecoline">Ecoline</a> (energiezuinig en milieubewust), <a href="http://www.venled.nl/nl/producten/coveline">Coveline</a> (waterdicht en robuust) en de <a href="http://www.venled.nl/nl/producten/supplyline">Supplyline</a> (voedingen em sturingen).</p>
                </div>
    <a href="/nl/over-venled/" title="VenLed LED-verlichting Venlo" class="buttonblue">Lees meer &gt;</a>

    </div>

    <div id="alertbox">
    <div class="content">


    <img src="/_upload/images/page/led-verlichting-catalogus.jpg" alt="Image: {title}" align="left"/>

    <h1>Blijf op de hoogte</h1>
    <p>Vraag geheel vrijblijvend onze catalogus aan. Of meld u aan voor onze nieuwsbrief. Op deze manier blijft u op de hoogte over onze laatste innovatieve Led-producten.</p>
    <p>&nbsp;</p>

    </div>
    <a href="/nl/aanvragen/" title="aanvragen" class="buttonblue">Lees meer &gt;</a>
    </div>

    </div>
    <div id="right_column">
    <div id="productlijnen">
    <div class="box_content">

    <h2>Productlijnen</h2>
                    <p>Ons assortiment bestaat uit de verschillende  productlijnen. Klik op een van de onderstaande productlijnen om verwante producten te bekijken.</p>

    </div>
    <ul>
    <li><a href="/nl/producten/decoline/" title="Decoline decoratieve Led verlichting" class="decohome_nl">Decoline led verlichting</a></li>
    <li><a href="/nl/producten/ecoline/" title="Ecoline decoratieve Led verlichting" class="ecohome_nl">Ecoline led verlichting</a></li>
    <li><a href="/nl/producten/coveline/" title="Coveline decoratieve Led verlichting" class="covehome_nl">Coveline led verlichting</a></li>
    <li><a href="/nl/producten/supplyline/" title="Supplyline decoratieve Led verlichting" class="supplyhome_nl">Supplyline led verlichting</a></li>
    </ul>
            </div>
    </div>

    <div class="inner_footer_bar">
    <div id="footer_menu">
    <ul class="footer_menu">
    <li><a href="/nl/sitemap/" title="Sitemap">Sitemap</a></li>
    <li><a href="/nl/algemene-voorwaarden/" title="Algemene voorwaarden">Algemene voorwaarden</a></li>
    <li><a href="/nl/disclaimer/" title="Disclaimer">Disclaimer</a></li>
                	<li><a href="/" title="VenLed LED-verlichting Venlo">&copy; 2009 VenLed</a></li>
    </ul>

    </div>
    <ul>
    <li id="path_title">U bevindt zich hier:</li>
    <li style="padding-left: 10px;"><a href="/" title="VenLed LED-verlichting Venlo">VenLed.nl ></a></li>
    </ul>
    </div>
        <div id="stamp">
    <a href="http://www.stylux.nl" title="Stylux" target="_blank">stylux.nl</a> <a href="http://www.theprojekt.nl" title="theprojekt" target="_blank">theprojekt.nl</a> <a href="http://www.timnotermans.nl" title="Tim Notermans" target="_blank">timnotermans.nl</a>
    </div>
    </div>
    </body>
    </html>

     

  • 02-26-2009, 8:19 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Images / CSS / files not visible/reachable

    It looks like requests for css and images are redirected to www.venled.nl/nl/ because of the second rule. A possible way to prevent that is to add a few more conditions to the second rule that does redirection, so the rule's conditions will look as below:

    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    <add input="{REQUEST_URI}" negate="true" pattern="^/backend/" />
    <add input="{REQUEST_URI}" negate="true" pattern="^/nl/?" />

    http://ruslany.net
  • 02-26-2009, 8:40 PM In reply to

    Re: Images / CSS / files not visible/reachable

    Thanks for your quick reply Ryslany

    where close, all images are working now including the css. But when typing in www.venled.nl its not redirecting to www.venled.nl/nl/

     a.t.m i tried as you suggested:

    (second rule) i left all the other rules intact.

    Thanks again.

     

    <rule name="Redirect" stopProcessing="true">
            <match url="(.*)" />
              <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    <add input="{REQUEST_URI}" negate="true" pattern="^/backend/" />
    <add input="{REQUEST_URI}" negate="true" pattern="^/nl/?" />
               </conditions>
            <action type="Redirect" url="http://www.venled.nl/nl/{R:1}" redirectType="Permanent" />
    </rule>

  • 02-26-2009, 10:32 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Images / CSS / files not visible/reachable

    I guess you will have to add another rule for that special case. Insert this rule after the "Redirect" rule:

    <rule name="Redirect Home Page" stopProcessing="true" >
      <match url="^$" />
      <action type="Redirect" url="http://venled.nl/nl"   />
    </rule>

    http://ruslany.net
  • 02-27-2009, 6:18 AM In reply to

    Re: Images / CSS / files not visible/reachable

     Thanks Ryslany you did it! It's finally working like it should be :)
    I also think I have all the elements I need for upcoming websites, as i can recycle the codes.

    Wouldnt be simling here if you didnt helped me. Thanks for sticking with me till the end.

    Great help! Thank again.

     

    For everyone else:
    Here are my rules:

    ______________________________________________________________________

             <rewrite>

                <rules>


                    <clear />
                    <rule name="Imported Rule 1" enabled="true" stopProcessing="true">
                        <match url="^(?:(en|nl)\/?)?([-a-z0-9_\/]+\/?)?$" negate="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="^/backend/" />
                        </conditions>
                        <action type="Rewrite" url="index.php?language={R:1}&amp;path={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>

    <rule name="Redirect" stopProcessing="true">
            <match url="(.*)" />
              <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    <add input="{REQUEST_URI}" negate="true" pattern="^/backend/" />
    <add input="{REQUEST_URI}" negate="true" pattern="^/nl/?" />
               </conditions>
            <action type="Redirect" url="http://www.venled.nl/nl/{R:1}" redirectType="Permanent" />
    </rule>

    <rule name="Redirect Home Page" stopProcessing="true" >
      <match url="^$" />
      <action type="Redirect" url="http://www.venled.nl/nl/"   />
    </rule>

                    <rule name="Imported Rule 1-1" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 2" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([0-9]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;{R:1}:p={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 3" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([a-z_]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;action={R:2}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>
                    <rule name="Imported Rule 4" stopProcessing="true">
                        <match url="^backend/([a-z0-9_]+)/([a-z_]+)/([0-9]+)/?$" ignoreCase="false" />
                        <action type="Rewrite" url="backend/index.php?module={R:1}&amp;action={R:2}&amp;id={R:3}&amp;{QUERY_STRING}" appendQueryString="false" />
                    </rule>              
                </rules>

            </rewrite> 

Page 1 of 1 (14 items)
Microsoft Communities