I have the following .htaccess file:

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^portfolio-single/([^/.]+)/?$ portfolio-single.php?id=$1 [L]

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all 
order deny,allow
</Files>

Options -Indexes

ErrorDocument 400 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 405 /error.php
ErrorDocument 408 /error.php
ErrorDocument 500 /error.php
ErrorDocument 502 /error.php
ErrorDocument 504 /error.php

```

Currently all pages that end with the php extension are working fine. So for example `www.somewebsite.com/blog.php` is now accessable via `/blog`. However I want a certain page, namely, `portfolio-single.php?id=123` to be accessible via `/portfolio-single/123`. The 4th line you can see code that I took from this [website](http://www.branded3.com/blogs/htaccess-mod_rewrite-ultimate-guide/), and I have been trying to get it to work but keep getting a 404 when I access portfolio-single via `/portfolio-single/123`. What am I missing? A follow up question is if I have to reboot XAMPP for changes to the .htaccess file to take effect (so far it has worked without).