I have to allow "." in the url?
I am doing url masking using codeigniter routing. Here I am allowing the user to enter text that will be the url of his bid data at a specific url.
those. if the user entered "offer1", then his data on offers will be available on
offers.com/offer/offer1
Here I only accept alphabets and numbers as URL text. Should I allow "." in the URL text? What should be the standard method?
When the user enters the name of the offer, do it like this $offer_name
and encode it withbase64_encode($offer_name);
$encoded_name = base64_encode($offer_name);
Submit this $encoded_name
to url ........... and if you want to use the sentence name decode it again usingbase64_decode($encoded_name);
if you need "." you can leave this in urls if you then use url parameters to trigger requests, just avoid params before triggering the request.
I usually do 301 redirect
in base_url();
if wrong with url parameters.
only my 2 cents
You can resolve "."
to url by adding "."
to $config['permitted_uri_chars']
config variable in config.php
.