Home rewrite url with id in .htaccess
Reply: 0

rewrite url with id in .htaccess

Michaël Thönnissen
1#
Michaël Thönnissen Published in 2017-11-14 12:13:56Z

I've attempted to rewrite an URL with .htaccess but nothing will do the right thing. I've tried many different possibilities with no effect. On the server rewrite_mod is enabled.

My intention is to rewrite the following URL:
domain.com/article/book.php?id=500

to:
domain.com/article/book/500

The .htaccess already has a RewriteRule for the extension of the pages:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.297658 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO