3 Replies - 978 Views - Last Post: 21 April 2017 - 11:44 AM

#1 dingdongwaka  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-April 17

Htaccess rewrite rule

Posted 19 April 2017 - 01:51 AM

Hi guys

I'm new to this forum so i hope i write my question in right category and so on ! anyway.

i'm working on a webshop and have a issue with it's url address it's very ugly and not SEO friendly. all the pages is SEO urls but not the search

the url is for a search: https://www.myurl.co...arch_query=snus


this is just the ID the search is searing in 2%2C4%2C9%2C6%2C5%2C10%2C7%2C11%2C36%2C37%2C50%2C8%2C21%2C29%2C22%2C24%2C23%2C53%2C31%2C30%2C32%2C52%2C72%2C13%2C39%2C25%2C14%2C64%2C12%2C33%2C34%2C43%2C35%2C40%2C51%2C15%2C16%2C20%2C19%2C54%2C41%2C49%2C42%2C46%2C55%2C74%2C45%2C48%2C57%2C58%2C59%2C27%2C38%2C28%2C47%2C65%2C60%2C61%2C62%2C63%2C70%2C66%2C67%2C68%2C71%2C73

and the search word is :search_query=snus

i would like to have the https://www.myurl.com/sok=snus or something more clean

Is This A Good Question/Topic? 0
  • +

Replies To: Htaccess rewrite rule

#2 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1769
  • View blog
  • Posts: 5,640
  • Joined: 15-January 14

Re: Htaccess rewrite rule

Posted 19 April 2017 - 11:23 AM

If all of that other data in the URL stays the same for every search, then it should be pretty straightforward to have a rule that will send your short URL to the longer one. That's a pretty basic URL rewrite, you just have a really long replacement URL.
Was This Post Helpful? 0
  • +
  • -

#3 dingdongwaka  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-April 17

Re: Htaccess rewrite rule

Posted 19 April 2017 - 02:21 PM

View PostArtificialSoldier, on 19 April 2017 - 11:23 AM, said:

If all of that other data in the URL stays the same for every search, then it should be pretty straightforward to have a rule that will send your short URL to the longer one. That's a pretty basic URL rewrite, you just have a really long replacement URL.

Yeah IT is The same URL for all The search
Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1769
  • View blog
  • Posts: 5,640
  • Joined: 15-January 14

Re: Htaccess rewrite rule

Posted 21 April 2017 - 11:44 AM

Then that's just a basic rewrite rule with a single replacement or pattern match, it's going to end up being a long one just because the URL you want is so long.

https://www.addedbyt...-for-beginners/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1