URL rewrite


pastpens
Asked:
2012-08-26 1:41 am EST

Hits: 593
hi i am beginner. someone built a website for me. it is written in php & mySQL. the categories are retrieved and generated by the database.
i would like to rewrite url for seo optimization. in my site there are 4 categories with url:
www.mysite.com/products.php?cid=1
www.mysite.com/products.php?cid=2
www.mysite.com/products.php?cid=3
www.mysite.com/products.php?cid=4

i would like to make it show up like this:
www.mysite.com/apple
www.mysite.com/banana
www.mysite.com/pear
www.mysite.com/orange

how can i do this, in a more simple way. is that simply changing .htaccess file, or is that related to rewrite mapping function. pls can you give me hint and exact example would be great. thanks

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

Scott
Staff
15,308 Points
2012-08-28 11:11 am EST
Hello pastpens,

While the redirect code can certainly be inserted into the htaccess,the site itself will need to know how to handle the "apple" (etc) categories.

That would be beyond the scope of our support as it will require a coder to build that functionality into the site.

Best Regards,
Scott M

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!