I've gone through the forum in regard to enabling Clean URL for IIS. Then I finally found out how it can be done using ISAPI_Rewrite and below is my httpd.ini

[ISAPI_Rewrite]

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]


# http://www.isapirewrite.com/
RepeatLimit 32

# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]

# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]

# Rewrite protolive to fully qualified url
RewriteCond Host: www
RewriteRule (.*) http\://localhost$1 [I,R]

# Don't rewrite the egs folder..
RewriteRule ^/egs/(.*)$ /egs/$1 [L]


# Accept a url with the following extensions and pass them through unchanged.
RewriteRule (.*.gif|.*.png|.*.jpg|.*.pdf|.*.js|.*.css|.*.ico) $1 [I,L]


# Accept a url with /cron.php and pass it through unchanged.
RewriteRule (/cron.php) $0 [I,L]

# Make URLs sane
RewriteRule /index.php.* $0 [I,L]
RewriteRule /(.*)\?(.*) /index.php\?q=$1&$2 [I,L]
RewriteRule /(.*) /index.php\?q=$1 [I,L]

With the rules written above, the drupal navigation is working well until i tried to use the Upload module. It seems like the rules written above won't work for upload module.

This is what it's displayed after I click the attach button. See here

Can somebody help me out with this?

Comments

chaloalvarezj’s picture

Have you found a solution to this issue? I am having the exact same problem.. It looks like the path "upload/js" can't be redirected. I've tried adding something like this:

RewriteRule /upload/js /index.php\?q=$1/upload/js [I,L]

but the problem persists. Help please...

seakayjay’s picture

yup... i got it working now. Apparently, the ISAPI rules on this post is not clean enough. Thus, it causes the upload module not to work.

Go to http://drupal.org/node/61367 to get a clean ISAPI rules.

softmun’s picture

the problem is in the Rule

RewriteRule (.*.gif|.*.png|.*.jpg|.*.pdf|.*.css|.*.swf|.*.flv|.*.zip|.*.bmp|.*.xml|.*.js|.*.html) $1 [I,L]
in .*.js

Rule OK

RewriteRule (.*.gif|.*.png|.*.jpg|.*.pdf|.*.css|.*.swf|.*.flv|.*.zip|.*.bmp|.*.xml|.*.html) $1 [I,L]

permit open files js write next rule, ignore url with directories misc, files, modules ....

RewriteRule /(?:misc|files|modules|themes|sites|uploads|)/(.*) $0 [I,L]