Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Filenames Extensions, From Sweden Need Help


Tavring

Recommended Posts

I'm new at the osc fourm.

I have a computer background as a IT-security consult.

Have some knowledges about PHP, and the OsCommerce files.

 

So if you have some time over to help me and others to solve this issue:

 

 

I have ultimate seo installed on oscommerce 2.3.1 everything works nice.

I have use cookies usage set to true, and have a shared ssl certificate trough justhost.com

No issue what so every.

 

SEO takes cares of almost everything to .html :rolleyes:

 

 

Now I want to change the main files in filenames.php to end with a .html (index.html, privacy.html, reviews.html)

Is this possible???

 

I have search allot and found out to change the file, include and include/languages then edit it in filenames.php.

 

Should i write a rule in .htaccess on the file? To allow any browser to redirect to .html extensions?

 

 

Thank you for your time and knowledges

Link to comment
Share on other sites

If the files do not contain any php renaming them in filenames.php should work otherwise redirect .html file to the same name php

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Thank you for your fast answer :D

 

I want to change the basic privacy.php, index.php to a .html extension

 

I understand I have to redirect them, In .htaccess in the catalog (/)

but don't know how to place the right writerule vaule.

 

Here is a small copy of .htaccess file.

 

RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

 

Don't know exactly how to edit the code? /catalog/yournewname.php /catalog/language/yournewname.php then in filename.php edit the filename to yournewname.html?

 

RewriteRule ^(.*)-pri-(.*).html$ yournewname.php?products_id=$2&%{QUERY_STRING}

 

The only thing i could find out was this post from the forum:

 

Posted 02 February 2011, 15:42

This will be a little bit of work for you.

 

1) You will have to change the name of file in /includes/filenames.php

 

For example login.php would be login.html

 

2) in .htaccess in the main folder /catalog/ you will need to add an entry for rewriterule for ^login.html login.php

 

3) in login.php ensure that the reference for language file is something like this:

 

require(DIR_WS_LANGUAGES . $language . '/' . str_replace('.html', '.php', FILENAME_LOGIN));

 

 

 

This is a just a quick and dirty way to do things. Never done it but want to eventually do it so if you can come up with a better or more precise method of doing it please do share.

 

Thanks

 

Thank you for your time and knowledges.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...