Welcome Guest, Not a member yet? Register   Sign In
Create PURL with CI
#11

[eluser]TheFuzzy0ne[/eluser]
Yes, of course. Those masks can be improved on, as you might even need to add numbers for anyone who has a name that already exists. As I haven't tested it, I thought I'd keep it simple for now and then build upon it if I'm back on the right track.
#12

[eluser]love2code[/eluser]
Guys that worked perfect. I also added '-'. Thank so much for all your help.
#13

[eluser]TheFuzzy0ne[/eluser]
Just to be sure, you will need to escape that hyphen, so:

Code:
$route['([A-Za-z]+\.[A-Za-z\-]+)'] = 'main/index/$1';

I'm sure you got it right though, as I'm sure that would have resulted in a parse error otherwise.

Oh, and one last thing - Welcome to the CodeIgniter forums! Big Grin
#14

[eluser]love2code[/eluser]
I didn't have \ but it worked, however I've added \ like you suggested.

CI is good, moreover you helpful people make it worth.

Thanks
#15

[eluser]Dam1an[/eluser]
You don't NEED to escape the - if you put it first, as it then knows you don't mean a range, so it takes the literal value, assuming its standard regex
(That being said, its probably a good idea to escape it anyway)




Theme © iAndrew 2016 - Forum software by © MyBB