detlev Posted October 27, 2013 Share Posted October 27, 2013 Can someone help me with the following : I would like to hide the php and html extensions on my website. I came across a lot of stuff with the HTacces. But i'm not really good at it. My websites are http://www.slaapzakken-discounter.nl and http://www.rugzakken-discounter.nl Please give me some advise how i can hide the extensions. Thanks in advance Link to comment Share on other sites More sharing options...
vekia Posted October 27, 2013 Share Posted October 27, 2013 you can't hide html code because it is always visible. php is hidden by default, you see only php output (no php code, just pure html) just wondering what you exactly want to achieve, can you shed some light on it please? Link to comment Share on other sites More sharing options...
detlev Posted October 28, 2013 Author Share Posted October 28, 2013 When you are on the product page, the website is www.blabla.nl/test.product.html That is what is would like to hide. This is a technical improvement for my website. I'm using an SEO program that gives me the advise to hide the php and html code. Link to comment Share on other sites More sharing options...
vekia Posted October 28, 2013 Share Posted October 28, 2013 hello url to your prooducts appear line you want (it's called friendly urls) http://www.slaapzakken-discounter.nl/gabbag-slaapzak/50-gabbag-slaapzak-lime.html you want to remove 50- ? Link to comment Share on other sites More sharing options...
detlev Posted October 28, 2013 Author Share Posted October 28, 2013 No i would like te remove the .html or hide it if it is possible. If i could remove the 50 that would be great to ! Link to comment Share on other sites More sharing options...
vekia Posted October 28, 2013 Share Posted October 28, 2013 in this case it will be necessary to modify "pattern" under preferences > seo & urls tab in your back office. you can specify there address format to certain page types in your store. you will need also modify dispatcher.php class (classes/Dispatcher.php) there is code: 'rule' => '{category:/}{id}-{rewrite}{-:ean13}.html', remove .html after this it's necessary to regenerate .htaccess file. Link to comment Share on other sites More sharing options...
detlev Posted October 28, 2013 Author Share Posted October 28, 2013 (edited) I can't find pattern under seo & urls. I'm using P.S. 1.4 There is no Dispatcher.php in the map Classes Edited October 28, 2013 by detlev (see edit history) Link to comment Share on other sites More sharing options...
nienha Posted December 10, 2013 Share Posted December 10, 2013 Just a comment to this topic, I just removed the ".html" part in the field "Route to products" under Preferences--->SEO and URLs --->Schema of URLs. With friendly url's enabled the ".html" part went away. I dont know if it breaks anything though, but, hell, trying and failing is life in a nutshell. Link to comment Share on other sites More sharing options...
vekia Posted December 10, 2013 Share Posted December 10, 2013 Just a comment to this topic, I just removed the ".html" part in the field "Route to products" under Preferences--->SEO and URLs --->Schema of URLs. With friendly url's enabled the ".html" part went away. I dont know if it breaks anything though, but, hell, trying and failing is life in a nutshell. it will not break anything this is the proper way to achieve it we can also modify dispatcher controller, but i think this way is for developers only thanks for information! Link to comment Share on other sites More sharing options...
Rhobur Posted January 30, 2014 Share Posted January 30, 2014 Taking away ".html" from the Schema of URLs means rewriting of .htaccess and redirect the old .html pages to the new without .html ending? Link to comment Share on other sites More sharing options...
vekia Posted January 30, 2014 Share Posted January 30, 2014 in simple words - that's right but in fact, it's a bit more complicated (in prestashop) Taking away ".html" from the Schema of URLs means rewriting of .htaccess and redirect the old .html pages to the new without .html ending? 1 Link to comment Share on other sites More sharing options...
Rhobur Posted January 31, 2014 Share Posted January 31, 2014 I think I'll pass then :-) it is not so big a SEO improvement to worth the headache! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now