Descartes Posted April 24, 2014 Share Posted April 24, 2014 (edited) Hello, I bought the new book version 2.0. I am now using the ex2 software testing. But the menus do not appear via htaccess. My htaccess is: <IfModule mod_rewrite.c> Options-MultiViews RewriteEngine on # For the primary categories: RewriteRule ^ shop / (coffee | goodies)? / Shop.php $ type = $ 1? # For sales: RewriteRule ^ shop / sales /? $ / Sales.php # For specific products: RewriteRule ^ browse / (coffee | goodies) / ([A-Za-z \ + \ -] +) / ([0-9] +) / $ browse.php type = $ 1 & category = $ 2 & id = $ 3? [edit] Yes Fixed. I have to change the menu in header html in shopon/shop/sales and it works [/edit] # For HTTPS pages: RewriteCond% {HTTPS} off RewriteRule ^ (\ checkout php |. Billing \ php |. Final \ php |. Admin / (*).) $ Https://% {HTTP_HOST} / $ 1 [R = 301, L] </ IfModule> Even with my ISP does not work. I work at home with xampp in localhost and the ISP in a sub folder test. Folder in localhost htdocs / shopon Anyone have an idea? Thanks and regards. Edited April 24, 2014 by Descartes Link to comment Share on other sites More sharing options...
HartleySan Posted April 24, 2014 Share Posted April 24, 2014 Hello and welcome to the forums. mod_rewrite is a tricky thing that causes a lot of people problems. For testing purposes, start of with something very simple (e.g., RewriteRule a.html b.html), and make sure that works. If it does, then you know the problem is with your regexes. If it doesn't, then you know the problem is with your setup/configuration. Link to comment Share on other sites More sharing options...
hartofboone Posted March 5, 2017 Share Posted March 5, 2017 Hello, I bought the new book version 2.0. I am now using the ex2 software testing. But the menus do not appear via htaccess. My htaccess is: <IfModule mod_rewrite.c> Options-MultiViews RewriteEngine on # For the primary categories: RewriteRule ^ shop / (coffee | goodies)? / Shop.php $ type = $ 1? # For sales: RewriteRule ^ shop / sales /? $ / Sales.php # For specific products: RewriteRule ^ browse / (coffee | goodies) / ([A-Za-z \ + \ -] +) / ([0-9] +) / $ browse.php type = $ 1 & category = $ 2 & id = $ 3? [edit] Yes Fixed. I have to change the menu in header html in shopon/shop/sales and it works [/edit] # For HTTPS pages: RewriteCond% {HTTPS} off RewriteRule ^ (\ checkout php |. Billing \ php |. Final \ php |. Admin / (*).) $ Https://% {HTTP_HOST} / $ 1 [R = 301, L] </ IfModule> Even with my ISP does not work. I work at home with xampp in localhost and the ISP in a sub folder test. Folder in localhost htdocs / shopon Anyone have an idea? Thanks and regards. I'm running XAMPP on my pc and I foundout that the httpd.conf for Apache needs to be edited and have "AllowOverride none" changed to "AllowOverride All" for the mod_rewrite to work. Then test to see if your .htaccess is working. To do that add something like RewriteRule ^test.php index.php in the .htaccess file. Link to comment Share on other sites More sharing options...
Larry Posted March 10, 2017 Share Posted March 10, 2017 Thanks for sharing that! Link to comment Share on other sites More sharing options...
Recommended Posts