Welcome Guest, Not a member yet? Register   Sign In
/ in uri segment
#1

[eluser]nigelb[/eluser]
I have a small problem. I have a parts database with over 140,000 records and I need to read the part number as part of the URL. It works fine for more, however there are some part numbers that have a / in them.

When I click these I get a Apache 404 (not the codeigniter 404). I have tried the codeigniter permitted characters code and also the php urlencode to no avail.

Can anyone help with this.
#2

[eluser]GSV Sleeper Service[/eluser]
urlencode() should convert the forward slashes into '% 2f' (without the space - this forum wont let me type it without!)
#3

[eluser]nigelb[/eluser]
if I do the urlencode I get the apache 404 error. removing it makes the uri segement to only pick up part of the product number
#4

[eluser]nigelb[/eluser]
i have found a way around the problem. I am using the CI encryption lib to encrypt/decrypt the text and so far it seems to be working well
#5

[eluser]bcorcoran[/eluser]
Could you not create a script to add an associative ID for each part which you would then call upon, rather than having to run the encryption library?

It is a tiny bit more work but then the application wouldn't need that extra resource every time a product is called.
#6

[eluser]nigelb[/eluser]
As it is an old database the needs cleansing and is only ever going to be used by about 5 people I think encryption is possibly the best option. I didnt want to add an extra complexity on the db site.




Theme © iAndrew 2016 - Forum software by © MyBB