.htaccess - Doesn't recognized my css, js, and so on -


i have .htacces like:

rewriteengine on rewriterule ^en/$             index.php?page=index&lang_id=2 rewriterule ^contact.html$    index.php?page=contact rewriterule ^en/contact.html$ index.php?page=contact&lang_id=2 # ...[and on] 

in site have switch language button(image). basic language in ro , and want swtich en. so, point on real server, switcher works. on local server, wamp, when try switch language, in browser appears text translated (as stocked in database), doesn't recognized css styles, images,...it appears text.

where problem ? please me.

are using absolute or relative urls external resources? problem folder pre-pended breaking relative urls.

so using image called logo.png , hosted in images folder, , referred image tag: <img src="images/logo.png" alt="logo" />. normally, if on contact.html page, browser check location http://localhost/images/logo.png /en folder, browser check http://localhost/en/logo.png doesn't exist.

the way fix using absolute urls, using

<img src="http://localhost/images/logo.png" alt="logo" /> 

should fix issues.


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -