1

I'm faced with the problem of CSS not being displayed after using the mod_rewrite in .htaccess, heres the problem:

Options +FollowSymLinks  
RewriteEngine On  
RewriteRule ^css/(.*)$ Templates/Testing/html/css/$1 [QSA]
RewriteCond %{SCRIPT_FILENAME} !-d  
RewriteCond %{SCRIPT_FILENAME} !-f  

RewriteRule ^.*$ ./index.php  

CSS is located in:

Templates/{TemplateName}/html/css/

TemplateName in this case being Testing.. But on my view source, it's just an infiniate loop to whatever I have in my

 <link href="" rel="stylesheet" type="text/css" />

I've tried making virtual directorys to remap a virtual directory to a physical directory, but this has no luck!

4

1 に答える 1

0

L両方のルールにフラグを追加してみてください:

Options +FollowSymLinks  

RewriteEngine On  
RewriteRule ^(css/.+)$ Templates/Testing/html/$1 [NC,L]

RewriteCond %{SCRIPT_FILENAME} !-d  
RewriteCond %{SCRIPT_FILENAME} !-f  
RewriteRule ^ index.php [L]
于 2013-11-07T07:20:11.957 に答える