Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

nickm
Advanced Member

Germany
443 Posts

Pre-sales questions only
(More Details...)

Posted - 11/16/2019 :  00:46:59  
Is it possible to remove the PHP extension from static product URLS and add trailing slash.

If so how?

Vince
Administrator

42874 Posts

Posted - 11/16/2019 :  01:08:31  
Hi Nick
There is a section about this here...
https://www.ecommercetemplates.com/seo/search-engine-friendly-urls-php.asp
You need the part under the heading "Extensionless URLs for other store pages", but if you are looking for extensionless URL's then the main section on Search Engine Friendly URL's may be of interest too.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

nickm
Advanced Member

Germany
443 Posts

Pre-sales questions only
(More Details...)

Posted - 11/16/2019 :  02:06:28  
I tried that but it had no effect at all.

Vince
Administrator

42874 Posts

Posted - 11/16/2019 :  02:32:19  
Hi Nick
There are two parts to this really, setting the $extension parameter, (or $GLOBALS['extension'] if you are using wordpress) and adding the rewrite rules. Have you done both of these? Remember that this will affect how the URL's are generated by the cart but if you have a link to the cart page in your navigation you have to change that to say cart/ instead of cart.php
Have you tried accessing the cart pages using the extensionless version of the URL?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

nickm
Advanced Member

Germany
443 Posts

Pre-sales questions only
(More Details...)

Posted - 11/16/2019 :  02:40:07  
I have BUT it is quite possible I don't understand it.

I can understand that static product or category pages might be tricky but I can't understand why pages like about.php and trademarks.php shouldn't work with just a change to .htaccess. I have tried many suggested htaccess code but it always shows about.php not the desired about/

Its almost as if something else is inhibiting it.

Edited by - nickm on 11/16/2019 02:46:33

Vince
Administrator

42874 Posts

Posted - 11/16/2019 :  02:52:03  
The Rewrite Rule that you would need for about.php would be...
RewriteRule ^about/$ about.php [NC,L]
Add that, then try accessing the URL
www.yourstoreurl.com/about/
...and see if you get the about page.
All that is doing is matching the URL ..../about/ and mapping it to ..../about.php

Vince


Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

nickm
Advanced Member

Germany
443 Posts

Pre-sales questions only
(More Details...)

Posted - 11/16/2019 :  02:55:30  
You would think it would work but no it doesn't. I get about.php

What I want is to access /about.php and get /about/

Edited by - nickm on 11/16/2019 03:15:11

Vince
Administrator

42874 Posts

Posted - 11/16/2019 :  03:22:22  
quote:
You would think it would work but no it doesn't. I get about.php
That sounds good to me as you are accessing about/ and getting the about.php page. That way the Search Engines and public "see" the extensionless URL and what is actually delivered is the php page. Does that make sense?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

nickm
Advanced Member

Germany
443 Posts

Pre-sales questions only
(More Details...)

Posted - 11/16/2019 :  03:33:45  
Yes. Makes sense.

It would be nice if there a generic bit of code which could handle all .php files.

nickm
Advanced Member

Germany
443 Posts

Pre-sales questions only
(More Details...)

Posted - 11/16/2019 :  06:38:10  
Thanks for the heads-up.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000