regex - mod_rewrite problem with relative path css/js -


hi have problem. want requests redirect index file in main directory , i've achieved there problems relative paths.
when put address like: mydomain.com/something works ok paths relative main directory.
the problem when put like: mydomain.com/something/somethingelse.

the .htaccess file:

 options followsymlinks rewriteengine on # ignore that's actual file rewritecond %{document_root}%{request_uri} !-f # redirect other traffic index page rewriterule . index.php [l] 

any ideas on how css/js working?


edit:

the problem css/js files aren't loaded when path entered have multiple slashes
like:mydomain.com/something/somethingelse

it no doubt better use absolute path static files (css, js, images etc). if lots of instances in several pages consider using html base tag specify default url relative paths. eg:

<base href="http://www.example.com/static/" /> 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -