nika Posted May 15, 2014 Share Posted May 15, 2014 i can't access any css and images folders. i have sent the whole day,try things hundred times, watch playlist about .htttaccess but without result. please tell me what should i write in .httaccess file to see css and images folders. my web root directory is C:\xampp\htdocs\larry-ecommerce\html Link to comment Share on other sites More sharing options...
HartleySan Posted May 15, 2014 Share Posted May 15, 2014 If you're using mod_rewrite, the best solution is to use an absolute path to all CSS/jS files. For example: http://www.example.com/css/styles-for-page.css Link to comment Share on other sites More sharing options...
nika Posted May 15, 2014 Author Share Posted May 15, 2014 i dont want to use mod_rewrite, i want to delete all .htttaccess files ,but it causes other lots of bugs and to fix that is very tedious process. just larry mentioned that, easy fix that problem is add .httacces file that code: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /ex2/ but what he mean in ex2? exactly what i need to add instead of ex2? my web root directory is C:\xampp\htdocs\larry-ecommerce\html . please help. Link to comment Share on other sites More sharing options...
HartleySan Posted May 15, 2014 Share Posted May 15, 2014 Here's the official Apache explanation of RewriteBase: http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase And here's a more understandable explanation of RewriteBase (I'd read the various answers for a more holistic view): http://stackoverflow.com/questions/704102/how-does-rewritebase-work-in-htaccess And another possible solution: http://michael.orlitzky.com/articles/avoiding_rewritebase_with_mod_rewrite.php Please look all of those over, and lemme know if you need additional help. Link to comment Share on other sites More sharing options...
nika Posted May 16, 2014 Author Share Posted May 16, 2014 thank HartleySan i fixed my problem Link to comment Share on other sites More sharing options...
nika Posted May 16, 2014 Author Share Posted May 16, 2014 just in header.html change the navigation links like this: /shop/sales/ - sales.php and so on Link to comment Share on other sites More sharing options...
HartleySan Posted May 16, 2014 Share Posted May 16, 2014 Well, that will only work in some cases (i.e., depending how your .htaccess file is structured). Still, glad you found a solution. Link to comment Share on other sites More sharing options...
Recommended Posts