littlemistress Posted March 10, 2007 Share Posted March 10, 2007 Hi all, This is my first post on the osCommerce supports forums so please be gentle!! I have just successfully installed the wonderful Ultimate_SEO_URLsv21da contribution Everything is working fine and my URLs are looking good i.e. http://littlemistress.co.uk/gift-ideas-c-43.html except i can't work out how to add in an additional dynamically generated page and mod rewrite the resultant URL? (in this instance a links page from the LinksManager_v_1.15 contribution) i'm getting.. http://littlemistress.co.uk/links.php?lPath=1 i've been trawling the forums for ages and keep getting snippets of info but no definitive list of steps, so far i've discovered.. STEP 1 (edit seo.class.php file) In the class constructor, line 548 begins the declaration for the $seo_pages array, where you will need to include the constant for each file you are adding. For example CODE if ( defined('FILENAME_LINKS') ) $seo_pages[] = FILENAME_LINKS; //this constant needs to be defined in filenames.php, or the page will not be added to the array. line 585 begins the declaration for the $this->reg_anchors array, where you will need to include the base and what it changes to. 'links_id' => '-l-', //this change needs to be reflected in your .htaccess file, too. STEP 2 (edit .httacess) what exactly do i need to add to the .htaccess file? i've tried interpreting from whats there all ready there i.e RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} but can't figure it out! finally i need to make a change along the following lines again to the seo.class.php file... In the function parse_parameters, you will need to add a 'case' for each type of page (links, etc) to the switch beginning on line 785. Each case has it's own switch for the possible variations. Very clever, really, the switch is looking for the state of true, and each case uses a statement which will resolve to either true or false. however i'm perplexed! how do i go about coding a new 'case'?? has this been covered in detail on another post? i'm sure adding new pages to the default Ultimate_SEO_URLsv21da install is fairly common i just can't find anything! its very possible i'm overcomplicating matters and there might be a much easier way to sort this issue out?? any thoughts/suggestions would be gratefully received! tim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.