NaveenYadav Posted December 27, 2013 Share Posted December 27, 2013 Hello All, I am facing some serious problem beacuse of htaccess. I have created module but I want to make this module seo friendly. I am already searching in the internet but nothing found. If you have any solution to make module seo friendly. Please help me out of this problem. Suppose my link is mysite.com/modules/wpblog/blog_detail.php?id_post=2 And I want to make this link seo friendly like this mysite.com/wpblog/?id_post=2 OR mysite.com/wpblog/2 Thanks Naveen Link to comment Share on other sites More sharing options...
vekia Posted December 27, 2013 Share Posted December 27, 2013 try to create .htaccess file with rewriteRules in your module directory , should work then for example RewriteEngine on RewriteRule ^wpblog/([0-9]+)$ blog_detail.php?id_post=$1 [NC] Link to comment Share on other sites More sharing options...
NaveenYadav Posted January 2, 2014 Author Share Posted January 2, 2014 Hello vekia, Thanks for update but not working. If I am right we need to change something file also If you have any module like this please share with me. I am waiting your quick responce. Thanks Naveen Link to comment Share on other sites More sharing options...
vekia Posted January 2, 2014 Share Posted January 2, 2014 hello you don't have to change any other file, it should work with code i attached above. have you created .htaccess file in module directory? does your host allow to use .htaccess files in subdirectories? Link to comment Share on other sites More sharing options...
NemoPS Posted January 2, 2014 Share Posted January 2, 2014 If you are on 1.5, you might also want to try out the dispatcher's addRoute method, which can be used from a module as well (there is a hook too, but I forgot the name) Link to comment Share on other sites More sharing options...
NaveenYadav Posted January 2, 2014 Author Share Posted January 2, 2014 (edited) Hello Vekia and nemo1, I have created the test module to implement the htaccess rule. Please find the zip of this module and give me the solution of this. Thanks Naveen htaccessmodule.zip Edited January 2, 2014 by NaveenYadav (see edit history) Link to comment Share on other sites More sharing options...
NaveenYadav Posted January 2, 2014 Author Share Posted January 2, 2014 Hello, This module is hook on left section here is different-different location of this module http://magento.thesparxitsolutions.com/Presta_Google/modules/htaccessmodule/test.php?id=1 http://magento.thesparxitsolutions.com/Presta_Google/modules/htaccessmodule/test.php?id=2 http://magento.thesparxitsolutions.com/Presta_Google/modules/htaccessmodule/test.php?id=3 http://magento.thesparxitsolutions.com/Presta_Google/modules/htaccessmodule/test.php?id=4 I want to redirect to like this http://magento.thesparxitsolutions.com/Presta_Google/htaccessmodule/test.php/4 Thanks Link to comment Share on other sites More sharing options...
NaveenYadav Posted January 3, 2014 Author Share Posted January 3, 2014 hello, Any Suggestion? Link to comment Share on other sites More sharing options...
NaveenYadav Posted January 13, 2014 Author Share Posted January 13, 2014 Hello Vekia and nemo1, Please help regarding my attached htaccessmodule.zip in above post. Link to comment Share on other sites More sharing options...
Recommended Posts