- This topic is empty.
-
AuthorPosts
-
May 21, 2013 at 4:09 pm #44945KarimCossuttiMember
Hi, i am desperate i know css tricks is front-end oriented but i’m hoping that a code ninja is on the watch, i currently have the code below to redirect all requests (except files) to the index.php unfortunately i cannot get my script to work because of some strange mime type error happening when my url ends with a slash.
The strange part is that my code output is the same with both urls but the error appears only in the / ending one.
So i’m looking for a way to redirect all request as it’s working right now just withouth slash or just solve the mime type issue, but i have no idea what is causing it…
Options +FollowSymlinks
# Options +SymLinksIfOwnerMatch
RewriteEngine On# Redirect /index.php to / (optional, but recommended I guess)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*index.php
RewriteRule ^index.php/?(.*)$ $1 [R=301,L]# Run everything else but real files through index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1?%{QUERY_STRING} [L]
May 21, 2013 at 5:55 pm #135908KarimCossuttiMemberErrors:
Resource interpreted as Stylesheet but transferred with MIME type text/html: “http://localhost/KarimCossutti/lab/css/main.css”. localhost:12
Resource interpreted as Script but transferred with MIME type text/html: “http://localhost/KarimCossutti/lab/js/plugins.js”. localhost:14
Resource interpreted as Stylesheet but transferred with MIME type text/html: “http://localhost/KarimCossutti/lab/css/normalize.min.css”. localhost:11
Resource interpreted as Script but transferred with MIME type text/html: “http://localhost/KarimCossutti/lab/js/main.js”. localhost:14
Resource interpreted as Script but transferred with MIME type text/html: “http://localhost/KarimCossutti/lab/js/vendor/modernizr-2.6.2.min.js”. -
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.