Jump to content

URL with trailing slash


andrew.irpin

Recommended Posts

Hello.

I have a problem with url.

I changed URL rules BackOffice->Settings->Seo&URL, and made changes in classes/link.php, classes dispatcher.php according to this topic: https://www.prestashop.com/forums/topic/220017-category-subcategory-url (attached screen)

And now a problem appers:

I have product pages: {rewrite}/p{id}/

And category pages: {categories:/}{rewrite}/c{id}/

And then I have URL for exaple:http://kreativnost.com.ua/panno-kosynka/p3519/ - everything works fine, but then i use http://kreativnost.com.ua/panno-kosynka/p3519 - without "/" - i have 404 error.

I can make the rule in htaccess file ta add "/" at the end of every url , but i have many pages in index like prices-drop, new-products and other tpl pages without "/" . And then htaccess rule add it to utl http://site.com/prices-drop/ I have 404 error. 

Can you tell me solution to make a rule - to add " / " to url if it is needed.

Or the second way - how can i add trailing slash to cms pages: new-products, prices-drop, quick-order, etc. Then i change htaccess to add / to all pages - these pages give me 404 error. 
And one more thing; then i go to parent category page (1-st level category), like http://kreativnost.com.ua/dekupazh/c44/ and use Url without trailing slash http://kreativnost.com.ua/dekupazh/c44 - this way trailing slash automatically adds to the link. But then i use subcategory link http://kreativnost.com.ua/dekupazh/zagotovki-dlya-dekupazha/dlya-doma/c49/ without trailing slash - i have 404 error.
Please, help me to solve this problem, i want to have possibility to use product and category ulr with or without trailing slash to redirect to one type of page url, perfectly with trailing slash.
 

 

post-739391-0-21334900-1429182937_thumb.png

Link to comment
Share on other sites

Hi.

 

This also bugs me. I tried to reconfigure some apache settings, however I don't get it to work correctly.

 

I would like to have trailing slashes on all urls, however the non-trailing ones should redirect.

 

The cms-urls also should work with a slash, currently I find no way to enable those.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...