I’m using IIS to develop and all the assets (js and css) aren’t loading. I’m a newbie and need help urgetly
Disable rewrites in lib/config.php
oh thanks worked ur awesome
No problem. If you want to use the rewrites on IIS (not really a big deal if you don’t use them) then you’ll have to figure out what’s necessary to add to your web.config
based on the generated .htaccess
Ok thanks really much appreciated
Oh and one more thing am getting two search forms on my template and I still can’t find what the cause is could u please help
You’ll have to merge in the searchform fix for WP 3.6. Grab the latest templates/searchform.php
from the repo and update the roots_get_search_form
function in lib/cleanup.php
Has anyone Been able to figure out what the rewrites are for IIS web.config? If not I may try to figure it out.
I had to do this on a fresh WordPress+Roots install. CSS and JS files weren’t loading. Grunt was minimizing the files, but the browser couldn’t see them.
I’m developing a site now for work, our servers are IIS, I’d love it if someone published the IIS equivalents for the rewrites. It’s above my knowledge and I’m afraid our infrastructure guys will just tell me to disable the rewrites if I don’t have the solution readily available.
@Wilmoth77 Are you trying to just setup your web.config to rewrite the url’s correctly or address the issue of having relative url’s working?
I the first case (for iis7+), you just comment out the rewrites in lib/config.php //add_theme_support('rewrites');
Then make sure you have the following as minimum in web.config
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<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"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I just want to thank @talves for his answer and @alfkonee for even having this question. You’ve saved me some time searching for the answer through the code or through Google. This thread should’ve been on Google, but apperantly worse answers were available.
@keeney you are welcome. I just noticed the code is not showing in my browser any longer Here is the Gist