i have a xampp server and when i want to use Mod_rewrite it redirects automaaticly to the address, what i want is a hidden redirect so the users doesn’t see it. for example:
localhost/projects/23/test ==> localhost/projects/?ID=23
without the user sees the ?ID=23. With my code the user is redirected and i don’t know why.
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/projects/([0-9]*)/(.*)$
RewriteRule ^projects/([0-9]*)/(.*)$ /projects?ID=$1 [L]
Can someone tell me what i do wrong or maybe how i can configue my Xampp server to stop redirecting.
Add trailing slash to the rewrite uri:
projectsis a folder, and Apache does this redirect by itself (adding trailing slash) if you hit name of the folder without trailing slash