Jupiters Posted July 30, 2008 Share Posted July 30, 2008 I noticed that some of my links still use the .php and not .html. My index page still loads as php. Also some of my other links such as the specials.php still load as php or all links in the information box. okay heres why: That's normal because these pages don't need URL rewriting. They never carry parameters like product-info.php. Your homepage is index.php and that's fine, because when that index.php carries parameters (such as /index.php?param1=A¶m2=cool.gif then it's rewritten to something like /blabhblah-1A-2B.html). No need to worry. anyway: i want to have all urls end with .html . i dont want to irritate my customers. how is that possible? Quote Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 31, 2008 Share Posted July 31, 2008 I noticed that some of my links still use the .php and not .html. My index page still loads as php. Also some of my other links such as the specials.php still load as php or all links in the information box. okay heres why: That's normal because these pages don't need URL rewriting. They never carry parameters like product-info.php. Your homepage is index.php and that's fine, because when that index.php carries parameters (such as /index.php?param1=A¶m2=cool.gif then it's rewritten to something like /blabhblah-1A-2B.html). No need to worry. anyway: i want to have all urls end with .html . i dont want to irritate my customers. how is that possible? If that is what you want then use Nimmit sef instead .... (By the way Nimmit Sef only work for shops using 1 language) Quote Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Jupiters Posted July 31, 2008 Author Share Posted July 31, 2008 If that is what you want then use Nimmit sef instead .... (By the way Nimmit Sef only work for shops using 1 language) Hi toyicebear, thx for your answer. really no way to make that with ultimate SEO? i wonder, cause thats the most adviced / promoted contribution for SEO. I would like to use that. especially after reading your comparism. it works quite find with header tags controller, besides. what is your opinion about this one: http://www.magic-seo-url.com/oscommerce/features.html sounds good, especially the duplicate content handling "story". costs 89 Euro, but perhaps i pay that, especially regarding duplicate content. Quote Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 31, 2008 Share Posted July 31, 2008 You can try to do a htaccess rewrite changing the php edings to html The mentioned commercial addon sounds ok, but it has a major drawback..its "encrypted" so you have no access to the code. If something should "break" its functions in the future (which can easily happen due to new versions of PHP and Mysql) you are totaly dependant on the company/person providing it making a fix. And if they as so many other small companies are gone/unreachable by then...well then you are stuck with a broken url system. Quote Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Jupiters Posted July 31, 2008 Author Share Posted July 31, 2008 ah okay, i didnt know it was encrypted. okay than i will not buy it. i tried to use the htacces respectivly to rewrite it....i didnt work. tried these to variants: RewriteRule ^contact_us\.html$ contact_us.php RewriteRule /contact_us\.html$ contact_us.php none worked. is there something else to do? any suggestions? thx You can try to do a htaccess rewrite changing the php edings to html The mentioned commercial addon sounds ok, but it has a major drawback..its "encrypted" so you have no access to the code. If something should "break" its functions in the future (which can easily happen due to new versions of PHP and Mysql) you are totaly dependant on the company/person providing it making a fix. And if they as so many other small companies are gone/unreachable by then...well then you are stuck with a broken url system. Quote Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 31, 2008 Share Posted July 31, 2008 (edited) adding something like this to your .htaccess file RewriteRule ^(.*)\.html$ $1.php [nc] Will let you use .html extensions for your .php files if you type in YOUR_WEBSITE/contact_us.html you will be taken to the correct page with .html showing instead of .php But you would also need to do some changes so that the links in your website have .html endings. This can be done in includes/classes/seo.class.php by adding this code $link = preg_replace('/.php/', '.html', $link); around line 707 just after this if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } Edited July 31, 2008 by toyicebear Quote Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Jupiters Posted July 31, 2008 Author Share Posted July 31, 2008 Hi toyicebear, THAT did the trick. really cool. thanks a lot. i did some heavy testing the last 2 hours an everything works. from your point of view, are there any negative things coming up using this (security, missing parameters and therefore missing functionality and so on?) now every .php from the frontend file is rewritten to .html correct? cool thing, ask myself why that isnt in the standard Ultimate SEO contri, dont u? adding something like this to your .htaccess file Will let you use .html extensions for your .php files if you type in YOUR_WEBSITE/contact_us.html you will be taken to the correct page with .html showing instead of .php But you would also need to do some changes so that the links in your website have .html endings. This can be done in includes/classes/seo.class.php by adding this code around line 707 just after this Quote Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 31, 2008 Share Posted July 31, 2008 Hi toyicebear, THAT did the trick. really cool. thanks a lot. i did some heavy testing the last 2 hours an everything works. from your point of view, are there any negative things coming up using this (security, missing parameters and therefore missing functionality and so on?) now every .php from the frontend file is rewritten to .html correct? cool thing, ask myself why that isnt in the standard Ultimate SEO contri, dont u? I don't use this myself..i have not tested it...it was just some code i made based on your request.... But it should not affect anything really...it basically just exchanges .php with .html ... But without testing it extensively in a live enviroment .. its hard to say if there could be any downsides or problems.... So keep testing it and if any problems pops up ..do post it in the forum Quote Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] 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.