Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

.htaccess - htaccess - RewriteRule for static files -


how rewrite urls images , other static files specific folder, i.e. using far:

rewriterule \.(woff|ttf|svg|js|ico|gif|jpg|png|css|htc|xml|txt)$ /myfolder/$1 

but not working,

please help.

------------------- update ---------------------

ok have:

rewritecond %{http_host} ^(www.)?exmpale.com$ rewritecond %{request_uri} !^/exmpale.com/ rewriterule ^(.*\.(woff|ttf|svg|js|ico|gif|jpg|png|css|htc|xml|txt))$ /exmpale.com/$1  rewritecond %{http_host} ^(www.)?exmpale.com$ rewriterule !\.(woff|ttf|svg|js|ico|gif|jpg|png|css|htc|xml|txt)$ /exmpale.com/index.php 

so images redirected exmpale folders work rewrite else index.php, above solution not working far.

cheers, /marcin

maybe want:

rewriterule ^(.*\.(woff|ttf|svg|js|ico|gif|jpg|png|css|htc|xml|txt))$ /myfolder/$1 

or perhaps this:

rewriterule ([^/]*\.(woff|ttf|svg|js|ico|gif|jpg|png|css|htc|xml|txt))$ /myfolder/$1 

if neither of you're looking please add details examples of desired inputs/outputs.

as update, want use l flag stop rule processing when rule matches. eg:

rewritecond %{http_host} ^(www.)?exmpale.com$ rewritecond %{request_uri} !^/exmpale.com/  # next line long. scroll end! rewriterule ^(.*\.(woff|ttf|svg|js|ico|gif|jpg|png|css|htc|xml|txt))$ /exmpale.com/$1 [l]  rewritecond %{http_host} ^(www.)?exmpale.com$ rewriterule .* /exmpale.com/index.php 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -