locked
Specify path with URL Rewriting RRS feed

  • Question

  • User-685201278 posted

     Hi friends,

    I have used url rewriting in my last project. I could do rewriting very well. I have a doubt in specifying path with url rewriting because, I specified path like http://mysite.com/images/img.jpg for images in the page. I followed the same for css, js.... Is there any problem with this method. Actually its so tedious to specify different path for development server and web server. Does anybody know better methods?

    thanks in advance

    -binoj-

    Tuesday, May 19, 2009 12:43 AM

Answers

  • User1289018300 posted

     Use relative path mathod for image and js, like src="/images/img.jpg" it will take from the root.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 19, 2009 5:00 AM

All replies

  • User1289018300 posted

     Use relative path mathod for image and js, like src="/images/img.jpg" it will take from the root.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 19, 2009 5:00 AM
  • User-685201278 posted

    Thanks Pankaj. But its not working

    Friday, May 22, 2009 12:32 AM
  • User1289018300 posted

    Have you look in to the view source. I think that might help you.........

    If possiable paste your code here so we can help you

    Friday, May 22, 2009 12:50 AM
  • User-685201278 posted
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link href="file:///C:%5CDOCUME%7E1%5Celby%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" mce_href="file:///C:%5CDOCUME%7E1%5Celby%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" rel="File-List"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} pre {margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";} span.start-tag {mso-style-name:start-tag;} span.attribute-name {mso-style-name:attribute-name;} span.attribute-value {mso-style-name:attribute-value;} span.entity {mso-style-name:entity;} span.end-tag {mso-style-name:end-tag;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->
    Existing Code 
     
    <table cellpadding="0" cellspacing="0" class="style2">

     <tr>

      <td height="20" background="http://mysite.com/images/left_dott.jpg" style="background-repeat:no-repeat" width="42">

       &nbsp;</td>

      <td background="http://mysite.com/images/left_back.jpg" style="background-repeat:no-repeat; background-" valign="top">

       <a href="http://mysite.com/category/Car_Gadgets.aspx" id="ctl00_gvCategories_ctl02_dlCategories_ctl00_lnkCategory" class="left_sub_cat">

        Car Gadgets</a><o:p></o:p>
       </td>

     </tr>

    </table>
     
    New code
     
     <table cellpadding="0" cellspacing="0" class="style2">

     <tr>

      <td height="20" background="/images/left_dott.jpg" style="background-repeat:no-repeat" width="42">

       &nbsp;</td>

      <td background="/images/left_back.jpg" style="background-repeat:no-repeat; background-" valign="top">

       <a href="<strike>/category/Car_Gadgets.aspx</strike>" id="ctl00_gvCategories_ctl02_dlCategories_ctl00_lnkCategory" class="left_sub_cat">

        Car Gadgets</a>



       </td>

     </tr>

    </table>
     
    Please note: The link marked crossed is not existing directory. 
    I have created the link for SEO

    <o:p> </o:p>

    Friday, May 22, 2009 1:16 AM
  • User1289018300 posted

     Have you configerd you site in IIS. and r you viewing it from their?

    Friday, May 22, 2009 2:26 AM
  • User-685201278 posted

     We are using development server with visual studio. URL rewriting is working well with the environment

    Saturday, May 23, 2009 12:06 AM