My Opencart website can't load files when it is in SEF mode and a categorie name is in the url . For example when i am in this URL :
http://thehouseofmarley.ir/speaker/nikon-d300
This relative URL in the page :
image/globe.png
Should compile like this :
http://thehouseofmarley.ir/image/globe.png
But The browser can't load it because that compiles like this :
http://thehouseofmarley.ir/speaker/image/globe.png
My htaccess file is unedited and it is equal to Github version :
https://github.com/opencart/opencart/blob/master/upload/.htaccess.txt
Anyone knows the solution?
Ok now you've hit the most common problem people face when switching to pretty URL schemes. Solution is also simple, just use absolute path in your css, js, images files rather than a relative one. Which means you have to make sure path of these files start either with http://
or a slash /
.
Otherwise You can add this just below <head>
section of your page's HTML: <base href="/" />
so that every relative URL is resolved from that base URL and not from the current page's URL.