Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End htacces & or PHP headache

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44945

    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]

    #135908

    Errors:

    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”.

    link:
    http://karimcossutti.com/newsite/lab/

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.