jf_evreux Posted January 28, 2006 Share Posted January 28, 2006 Hi there, i'm looking for an easy way (trough htaccess?) to rewrite the advanced_search_result.php in that kind of way : advanced_search_result?keywords=mp3&subcat=1&search_in_description=1&cid= to search-mp3.html I've looked everywhere but could'nt find a way to do it, any idea guys ? Thank you, have a nice week end ! JF Link to comment Share on other sites More sharing options...
Guest Posted January 28, 2006 Share Posted January 28, 2006 Try hacking Ultimate SEO URL's. It is a contribution that will do the same as you want for category and product pages, I am sure you could do it for advanced search results. Link to comment Share on other sites More sharing options...
jf_evreux Posted January 28, 2006 Author Share Posted January 28, 2006 Try hacking Ultimate SEO URL's. It is a contribution that will do the same as you want for category and product pages, I am sure you could do it for advanced search results. thx, but i don't have the ability to hack anything in php ^^ I was hopping finding a way trough htaccess modification only? Link to comment Share on other sites More sharing options...
Guest Posted January 28, 2006 Share Posted January 28, 2006 I assume you want to do this for search engine optimization so that customer searches would build hghly themed content pages automatically. Not a problem :) First, you'll need to capture the customer search term(s) and store them in the database. Then, create a script called "recent_searches.php" and aggregate the data. Use that script to create the links to the static HTML files like you want and add a single line in the .htaccess file. RewriteRule ^search-(.*).html$ advanced_search_result?keywords=$1&%{QUERY_STRING} Link to comment Share on other sites More sharing options...
jf_evreux Posted January 28, 2006 Author Share Posted January 28, 2006 thank you for answering. In fact i just need the rewriting of the advanced_search_result.php file. Yep i need this to make links to what i consider top searches (so i don't need to store recent searches) ;-)) I try to add this .htaccess files in the same directory than advanced_search_result.php : RewriteEngine OnRewriteRule ^search-(.*).html$ advanced_search_result?keywords=$1&%{QUERY_STRING} And then typed the url search-keyword.html but the advanced-search-result.php rewriting is not working, no page is displayed (404 error)... Any clue of what i did wrong ?? Thanks again Link to comment Share on other sites More sharing options...
Guest Posted January 28, 2006 Share Posted January 28, 2006 RewriteRule ^search-(.*).html$ advanced_search_result?keywords=$1&%{QUERY_STRING} SHOULD BE RewriteRule ^search-(.*).html$ advanced_search_result.php?keywords=$1&%{QUERY_STRING} Notice the file extension was left off. Link to comment Share on other sites More sharing options...
jf_evreux Posted January 28, 2006 Author Share Posted January 28, 2006 RewriteRule ^search-(.*).html$ advanced_search_result?keywords=$1&%{QUERY_STRING} SHOULD BE RewriteRule ^search-(.*).html$ advanced_search_result.php?keywords=$1&%{QUERY_STRING} Notice the file extension was left off. yes i 've added the extension, but still not working...my site is hosted on a dedicated server, maybe there s something i've not configured to have the rewrite working... Link to comment Share on other sites More sharing options...
jf_evreux Posted January 29, 2006 Author Share Posted January 29, 2006 yes i 've added the extension, but still not working...my site is hosted on a dedicated server, maybe there s something i've not configured to have the rewrite working... hi there, i chek my server, and the rewrite mod is enable on Apache, so i can't figure out what's wrong with the htaccess code you gave me...any clue ?? Thanks, JF Link to comment Share on other sites More sharing options...
Mercurius Posted September 3, 2009 Share Posted September 3, 2009 Ok one, the code in .htaccess is not sufficient. I installed ULTIMATE_SEO_URLs. How does the code have to look in class/seo.class.php? Does someone have an idea? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.