Jump to content
php.lv forumi

kas notiek ar direktorijam? :/


EdgarsK

Recommended Posts

Sveiki,

 

lieta sekojoša

 

http://localhost/index.php

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

 

ir mape /css

ir fails /css/style.css

 

Stils netiek ieladets, atverot caur brovseri to failu vispar tuksums, neka nav.

tas pats arii ar /img failu, nesaprotu, 100% ka htaccess pie vainas, jo novacot to viss ir kartiba

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^!([*])$ index.html [L,QSA]
RewriteRule ^(.*)$ index.php?path=$1 [L,QSA]

Link to comment
Share on other sites

Stils netiek ieladets, atverot caur brovseri to failu vispar tuksums, neka nav.

tas pats arii ar /img failu, nesaprotu, 100% ka htaccess pie vainas, jo novacot to viss ir kartiba

Tāpēc, ka Tev ir nepareizs .htaccess. Katram RewriteRule vajag savus RewriteCond. Pamēģini tā:

 

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^!([*])$ index.html [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?path=$1 [L,QSA]

Link to comment
Share on other sites

pietiek ja sākumā ieliek šo

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]

tālāk cik rules vien vajag ;)

 

un jā visi RewriteCond attiecas tikai uz tuvāko rule (EdgarsA rtfm? :D)

Edited by 2easy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...