Marcel Vuijk Marcel Vuijk - 1 year ago 112
PHP Question

How to make a clean URL of this (htaccess URL rewrite)

I use a support system and I want to rewrite the URLs to make them more SEO friendly and better readable. I have very basic understanding of .htaccess rewrite rules / regex and I tried a hundred things, but could not get it working.

The support system is installed on this URL:

The code is generating this URL for every article in the KB:

The code is generating this URL for the category overview within the KB:

How can I rewrite those URLs to something readable and SEO friendly like:

And for categories:

If this is even possible? And if so, how can I do this using .htaccess.

Answer Source

Well you can make the friendly URLs work like this:

RewriteRule ^help/article/(.+)$ help/index.php?/selfhelp/view-article/$1
RewriteRule ^help/categories$ help/index.php?/selfhelp/categories
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download