Category : .htaccess

URL Examples: 1) mydomain.com/coding/mysql/ 2) mydomain.com/coding/mysql/?contactId=333&UTM=aff 3) mydomain.com/coding/?contactId=333 This is my htaccess file RewriteEngine On RewriteRule ^(.+)/(.+)/?$ index.php?book=$1&chapter=$2 [NC,L,QSA] RewriteRule ^(.+)/?$ index.php?book=$1 [NC,L,QSA] So I print_r($_REQUEST) on the index.php file to see what I was getting: 1) Array ( [book] => coding [chapter] => mysql/ ) 2) Array ( [book] => coding [chapter] => mysql/ ..

Read more

I’m working on a project in PHP and I want my URLs to look friendly user, so this is what I currently have: www.site.com/index.php?view=1 www.site.com/index.php?view=2&id=21 www.site.com/index.php?view=3&id=88 And this is what I expect to have: www.site.com/teacher www.site.com/student?id=21 www.site.com/book?id=88 Is there any way to to without htaccess, only by using PHP? If don’t, how can I map ..

Read more

Am using codeigniter 3(HMVC) and utilized default routing system provided by the codeigniter. i want to add a username to the every URL after successful login. Example: http://localhost/project_name/controller_name/method_name/ to http://localhost/project_name/dynamic-logged-username-slug/controller_name/method_name/ here i just need to display the username and i won’t be use that name for any kind of process is it possible to achieve ..

Read more

I need to have this URL domain.com/var1/var2/?var3= i.e (domain.com/jingle/bells/?id=3033) to receive parameters this way domain.com/?var1=&var2=&var3= i.e. (domain.com/?title=jingle&subtitle=bells&id=3033) On top of that is it possible to have infinite number of variables after var3? Like: domain.com/?var1=&var2=&var3=&var4=&var5… to be domain.com/var1/var2/?var3=&var4=&var5… Thank you!! Sourc..

Read more