I have just one root directory with index.php in it along with two folder img and css. I refer to files in this folder like: src="img/path.png" i.e relative to the root directory.
Geçen gün bazı mod_rewrite soru vardı & Bu birisi bölü ve css / img parçalanıyor firar dışında gayet wrok görünüyor, hangi bana ne verdi
RewriteRule ^ $ index.php? Page = 1 [L]
RewriteRule ^ ([0-9] +) /? $ Index.php? Page = $ 1 [L]
RewriteRule ^ ([A-Za-z] +) /? $ Index.php? Kategori = $ 1 & page = 1 [L]
RewriteRule ^ ([A-Za-z] +) / ([0-9] +) /? $ Index.php? Kategori = $ 1 & sayfa = $ 2 [L]
Bu beni rahatsız budur:
Kural1 kullanılması:
www.example.com changes to www.example.com/index.php?page=1 which is great Also www.example.com/ some how changes to www.example.com which is again great
Kural2 kullanılması:
www.example.com/2 changes to www.example.com/index.php?page=2 like what I would want But using www.example.com/2/ (TRAILING SLASH) also retrieves page=2 but somehow the img and css breaks apart. I am guessing the problem is with url being treated as directory structure and then it cant find img and css folder there.
Kural 3 kullanma:
www.example.com/Football changes to www.example.com/index.php?category=Football&page=1 again like what I would want But www.example.com/Football/ (TRAILING SLASH) suffers from the same problem with img and css breaking apart
Kural 4 kullanma:
www.www.example.com/Football/2 hatta css ve img üzerinde eğik çizgi breaksdown olmadan Ancak sayfası düzgün tha sayfa ve kategori alabilirsiniz.
How do I correct this problem without having to use absolute paths in my html. Please advise on the trailing slash problem as well.