Jump to content

Remove question mark from URL query


zolwix

Recommended Posts

Is there any way I can remove the question mark from URL using Mod_Rewrite like this?:

 

domain.com/controller-name?parameter/parameter/parameter

 

to change question mark after controller-name to slash

 

domain.com/controller-name/parameter/parameter/parameter

 

I want to add this to htaccess in PrestaShop, where I send query like this: parameter/parameter/parameter to controller.

 

Controller is added to SEO options and there is setting changing controller=controller-name to controller-name

 

Link to comment
Share on other sites

you use some kind of "pretty" urls ? this is not how prestashop generates url by default.

 

Yes I know, normal Presta URL is domain.com/index.php?controller=controller-name and I set on SEO settings friendly URL to this controller to rewrite to only controller-name so SEO friendly URL is domain.com/controller-name .

 

To send some parameters to this controller I can use URL like this: domain.com/controller-name?(here parameters)

 

In my controller I grab parameters after question mark ? and show content according to this parameters. The parameters are separated by a slash. So I want to get rid of question mark and replace it by slash to get: domain.com/controller-name/(here parameters)  with parameters I want to look like this domain.com/controller-name/parameter/parameter/

 

When I use URL domain.com/controller-name/parameter/parameter/ shows error 404 and Presta don't see that I want content from controller-name.

 

I think it is achievable by mod_rewrite rule in .htaccess, but I don't know how to write rule according to this problem.

Edited by zolwix (see edit history)
Link to comment
Share on other sites

Hello,I have a similar problem:

 

I have an URL problem which bring down the google search results.

 

If the site map generator create an URL like this:

 

mydomain//content/6-melltarto-meret-tablazat 

 

why this way  appears on google search:

 

http://mydomain/content/6-melltarto-meret-tablazat?content_only=1

 

 

Thanks a lot if somebody could answer,

 

 

Kata

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...