URI Routing problem |
[eluser]presto5[/eluser]
Hi everybody!!! I'm trying to make e-mail validation. User receives a letter with activation URI in this format: http://site/activation/login/md5_hash something like: http://www.site.com/activation/presto6/2...dbad52c930. I tried different types of redirects, but everytime i had on of next: page not found --or-- it shows me index page Please, can you help me with this. Or probably there is another way making this.
[eluser]ejangi[/eluser]
What do you mean by "I tried different types of redirects"? What are you redirecting to and why? What is the URL when you get "page not found" and what is the URL when you get the index page?
[eluser]presto5[/eluser]
E.q. redirect is $route['activation/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)'] = "activation/user/$1/$2"; URI is: http://planet/index/activation/presto6/2...dbad52c930 , where index - my index page and i get page not found
[eluser]presto5[/eluser]
And one more question: Where you guys usually store all the images, css? And what links you put in code. I made all the links like Code: <img src="..images/image.gif"> And i access the class, like: site/index.php/some_class ... the pictures is fine, but if i access the function in the class, like: site/index.php/some_class/some_function ... all the pictures or css dissapear
[eluser]ejangi[/eluser]
You should use the base_url(); helper: Code: <img src="<?php echo base_url(); ?>images/image.gif" alt="Whatever" /> base_url() just returns the value of $config['base_url'] in your config.php file. You will need to autoload the "url" helper though. ;-)
[eluser]presto5[/eluser]
You're right. And now i can make it without any redirect. Thanks a lot!!! :-) |
Welcome Guest, Not a member yet? Register Sign In |