puecher Posted October 7, 2012 Share Posted October 7, 2012 (edited) URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URLs you must activate this mod. Hi, PS (Tools::apacheModExists) checks if PHP has enabled mod_rewrite. If you run PHP in CGI/FastCGI mode, PS does not detect it. If you are sure that mod_rewrite works, you can override Tools::apacheModExists: class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } Cheers, Patrick Edited October 7, 2012 by puecher (see edit history) 1 Link to comment Share on other sites More sharing options...
pneeds Posted October 10, 2012 Share Posted October 10, 2012 Where are these files located? I've run into this error but I'm completely lost with your explanation. Where do I find all these things? Link to comment Share on other sites More sharing options...
vynx Posted October 11, 2012 Share Posted October 11, 2012 if i'm not wrong in the : Classes/Tools.php file. CMIIW Link to comment Share on other sites More sharing options...
luisvillacrez Posted October 11, 2012 Share Posted October 11, 2012 Hi, PS (Tools::apacheModExists) checks if PHP has enabled mod_rewrite. If you run PHP in CGI/FastCGI mode, PS does not detect it. If you are sure that mod_rewrite works, you can override Tools::apacheModExists: class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } Cheers, Patrick Where do i put this code? Thank in advanced Link to comment Share on other sites More sharing options...
rawsta Posted October 12, 2012 Share Posted October 12, 2012 (edited) if i'm not wrong in the : Classes/Tools.php file. CMIIW it's better to put it into the override/classes/tools.php this way it doesn't get overwritten during an update Edited October 12, 2012 by rawsta (see edit history) Link to comment Share on other sites More sharing options...
vynx Posted October 12, 2012 Share Posted October 12, 2012 Hi, so its solved? Link to comment Share on other sites More sharing options...
puecher Posted October 23, 2012 Author Share Posted October 23, 2012 Where are these files located? I've run into this error but I'm completely lost with your explanation. Where do I find all these things? Create a file called tools.php containing the code that I posted and upload the file to override/classes/tools.php. Link to comment Share on other sites More sharing options...
Bejo Posted October 28, 2012 Share Posted October 28, 2012 (edited) Create a file called tools.php containing the code that I posted and upload the file to override/classes/tools.php. i got error class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } and can not access my website else!! Help! Please Edited October 28, 2012 by jesen (see edit history) Link to comment Share on other sites More sharing options...
puecher Posted October 31, 2012 Author Share Posted October 31, 2012 Hi, which error do you get? Link to comment Share on other sites More sharing options...
Bejo Posted November 1, 2012 Share Posted November 1, 2012 i can not access my website when i was did as you told!! The warning was appear is class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } Link to comment Share on other sites More sharing options...
puecher Posted November 7, 2012 Author Share Posted November 7, 2012 Hi jesen, can you please copy & paste the text of the warning? Link to comment Share on other sites More sharing options...
Bejo Posted November 8, 2012 Share Posted November 8, 2012 (edited) Hi jesen, can you please copy & paste the text of the warning? thank your for attention. i appreciate it Here for print screen Result. thx Edited November 8, 2012 by jesen (see edit history) Link to comment Share on other sites More sharing options...
yubabikes Posted November 19, 2012 Share Posted November 19, 2012 so what is the fix here and where should it be integrated? replaces which line? Thanks in advance. Link to comment Share on other sites More sharing options...
puecher Posted November 30, 2012 Author Share Posted November 30, 2012 Hi jesen, do not forget to add <?php <?php class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } ?> Link to comment Share on other sites More sharing options...
ibe Posted January 3, 2013 Share Posted January 3, 2013 (edited) Thank you. Do not write/copy the closing: ?> It solved my problem. Edited January 3, 2013 by ibe (see edit history) 1 Link to comment Share on other sites More sharing options...
Never_give_up Posted January 9, 2013 Share Posted January 9, 2013 Go to file /override/classes/tools.php replace: <?php class Tools extends ToolsCore { } with this: <?php class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } go back to admin, select SEO & URLs from preferences, click on the save button. Finish 3 Link to comment Share on other sites More sharing options...
Swickaar Posted June 30, 2013 Share Posted June 30, 2013 Go to file /override/classes/tools.php replace: <?php class Tools extends ToolsCore { } with this: <?php class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } go back to admin, select SEO & URLs from preferences, click on the save button. Finish Unable to find this in the told file. Please help. This issue is still not resolved in my PS1.5.4.1 Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2013 Share Posted June 30, 2013 you have to create override, create this file with code that Never_give_up suggested Link to comment Share on other sites More sharing options...
generalexperts Posted August 12, 2013 Share Posted August 12, 2013 (edited) I searched for the file tools.php and I do not have one. So I created a php file with the code given above. I put it into override/classes/tools.php and it did not work. I actually have two paths for override/classes/ so I added it in both. This still doesn't work and I still get the "URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod." message next to the Friendly URL in my prestashop 1.5. Okay, I got this message to go away, by refreshing my File Manager. But then all the images turned to "?." To fix "?" images, check out other posts on that topic. Edited August 13, 2013 by generalexperts (see edit history) Link to comment Share on other sites More sharing options...
GRM Internet Posted August 13, 2013 Share Posted August 13, 2013 I did it and does not Work! I Still get the message: Reescrita de URL (mod_rewrite) não está ativo no seu servidor, ou não é possível verificar a configuração do servidor. Se você quiser usar URLs amigáveis você deve ativar este mod My language is BR. Link to comment Share on other sites More sharing options...
steve_s741 Posted August 17, 2013 Share Posted August 17, 2013 Never_give_up, I looked for a "tools.php" file in the /override/classes folder and couldn't find one, so I tried creating one with just your code in it and it makes no difference. I also tried renaming "tools.php" to "Tools.php" to match the name of the file I found in the /classes folder, but this didn't help. Out of curiosity, I modified /classes/tools.php to add your code, but that just breaks the back end altogether. Any other ideas? This whole "friendly URL" issue seems to be a huge pain for all! Steve Link to comment Share on other sites More sharing options...
yahyasiaga Posted September 20, 2013 Share Posted September 20, 2013 Hi jesen, do not forget to add <?php <?php class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } ?> Thanks...it's work...it's solved... 1 Link to comment Share on other sites More sharing options...
cse_king2 Posted November 5, 2013 Share Posted November 5, 2013 Hi, I am new to PrestaShop and currently using PrestaShop version: 1.5.4.1. Instead of apacheModExists I have overridden with modRewriteActive(). It works fine for me. Let us know whether it will affect other functionality in PrestaShop <?php class Tools extends ToolsCore{public static function modRewriteActive(){return true;}}?> Link to comment Share on other sites More sharing options...
Guest D_Frost Posted December 22, 2013 Share Posted December 22, 2013 Hello, im hosting PS 1.5.5 on a Strato Server and I can not get the URL rewriting to work using your suggestions. Any suggestions for me? Greetings Link to comment Share on other sites More sharing options...
mrbatyo Posted March 5, 2014 Share Posted March 5, 2014 Thanks...it's work...it's solved... Hy it's working. PS 1.5.6. <?php class Tools extends ToolsCore { public static function apacheModExists($name) { return true; } } ?> Link to comment Share on other sites More sharing options...
taryono Posted April 6, 2014 Share Posted April 6, 2014 Hello, Please help. my site can not acsess for www. but it can be acessed frfom no www note : please forgive me if this question is not for this thread. regards Link to comment Share on other sites More sharing options...
Cintia Posted April 7, 2014 Share Posted April 7, 2014 I just made this and the error message is gone, but I still get the 404 in the frontpaage. Please HELP!! Link to comment Share on other sites More sharing options...
vitochueng Posted May 12, 2014 Share Posted May 12, 2014 Hello, Please help. my site can not acsess for www. but it can be acessed frfom no www note : please forgive me if this question is not for this thread. regards HI, the same problem for me. Have you found the solution yet? Link to comment Share on other sites More sharing options...
somits1 Posted November 5, 2015 Share Posted November 5, 2015 how to know mod_rewrite enable or not. I am using prestashop v1.5.6 english for my site http://slmobileprice.com Link to comment Share on other sites More sharing options...
somits1 Posted November 5, 2015 Share Posted November 5, 2015 How to check mod_rewrite enable or not. I have check php information there are only 3 rewrite option - Please check below - and tell me mod_rewrite enable on not on my server. _ENV["IIS_UrlRewriteModule"] 7.1.0761.0 url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset= _SERVER["IIS_UrlRewriteModule"] 7.1.0761.0 Thanks, Somit Link to comment Share on other sites More sharing options...
joraColea Posted January 16, 2017 Share Posted January 16, 2017 Here is a very good solution how to setup Mode rewrite on apache server!https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewriteIt helped me a lot! Link to comment Share on other sites More sharing options...
joraColea Posted January 16, 2017 Share Posted January 16, 2017 Here is a very good solution how to setup Mode rewrite on apache server!https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewriteIt helped me a lot! Link to comment Share on other sites More sharing options...
Recommended Posts