I want some fresh eyes about this. I am getting trouble recognizing the issue.

In folder X I've an .htaccess file using the following two lines inside it:

RewriteEngine on
RewriteRule ^([A-Za-z0-9\.-]+)/?$ item-display.php?bibid=$1 [NC,L]

My interpretation is the fact that anything for the reason that directory will be rerouted towards the item-display page. The issue is that around the item-display page, echoing out the need for bibid results 'display-item'. So in some way I am redirecting from: http://localhost/test/cat/item/14056a to: http://localhost/test/cat/item/item-display.php?bibid=item-display

Any ideas?


You need to exclude the file you're redirecting to as that's also matched up through the pattern:

RewriteCond %{REQUEST_URI} !/item-display\.php$
RewriteRule ^([A-Za-z0-9\.-]+)/?$ item-display.php?bibid=$1 [L]

Do this

RewriteEngine on
RewritePath /test/cat/item
RewriteRule ^([A-Za-z0-9\.-]+)/?$ item-display.php?bibid=$1 [L]

I believe the issue is that it's searching in the whole URL and not simply the final item ID part.

The request is sub-processed therefore it extracts the rewritten URL's filename part I presume. Try adding the NS flag.