Thank you for the tutorial, i was working on a very very simple router.. just for 3 pages, and dont want to use a complete framework for such simple task. It only needs to route some names or ids.. this works like a charm!! Ive been looking for this a while, never got it to work, untill i found ur tutorial! thanks again!
@rusofob12345
9 жыл бұрын
Thank you very much, searched a lot on Internet, but couldn't find how to upload content on dynamically created pages, but your video helped.
@ivanorezac
8 жыл бұрын
I love it how you said if( $url == ( blank || 'home' ) ) And I was like THAT IS AWESOME, how come I've never seen that, I've been looking for that all my life, and it turns out it isn't a valid expression haha
@ZheerHalkawt
8 жыл бұрын
+ivanorezac i saw your comment and that made me to not watch the video xD
@ivanorezac
8 жыл бұрын
+Emprator Z Actually the video is quite good, I'd recommend it.
@TheOnlyJura
6 жыл бұрын
Yeah actually it's even pretty stupid since (FALSE || 'home') evaluates to TRUE...
@BaylorBreaksItDown
6 жыл бұрын
It’s been a while since I watched the video but I believe that would be the correct case no? If home is the equivalent of an empty route.
@ampiyong
13 жыл бұрын
nice tuts...great explanations....
@kervmeister69
11 жыл бұрын
you're a real lifesaver...
@DevTalk
11 жыл бұрын
Smooth, Sweet, Clean
@AnovSiradj
11 жыл бұрын
awesome tutorial...,
@salimsikar
11 жыл бұрын
very nice ...
@cb5151
10 жыл бұрын
major help thanks alot
@royallan864
10 жыл бұрын
So then how do you load get variables like site.com/page/id/page_num/edit while php site.com/page or site.com/?p=pagename&id=4147&p_id=2&mode=edit so from get array $_GET["p"] I would have to instead use a numbering system to hold the structure of the vars? like site.com/page/id/page_num/edit basename["1"] to make it dynamic or name manuly to get baseneame['p'] by keywords.
@AnovSiradj
10 жыл бұрын
better than my way. nice
@leessiloue7500
6 жыл бұрын
Thanks for this tutorial but it would be nicer if you zoom in to the text portion instead of showing the entire desktop.
@BaylorBreaksItDown
6 жыл бұрын
Lees thank you. That’s something I learned later on I guess!
@AhmadAzizov
11 жыл бұрын
Thanks!
@BaylorBreaksItDown
14 жыл бұрын
I used ApacheFriends' XAMPP for Macintosh.
@MrLahirukaka
8 жыл бұрын
Thank you..
@ibrahimhasanov80
8 жыл бұрын
Whole Url cleans that I have seen before and also now have bug.This bug is about if User going to write ...product/category/12/a/a/a/a/s/d/asd//asf/as/df/as/df//asd/fa/sd/fas/df/as/df/ It will run Like ...product/category/12
@_slier
13 жыл бұрын
@coolcam262 are you sure? cause i been dissecting couple of cms and they got clean url without using any .htaccess file...i think they using some sort of router class
@fullbinky
14 жыл бұрын
thanks!
@b1rebel
11 жыл бұрын
oh nice :D
@royallan864
10 жыл бұрын
And how do you make it work for search bars that use GET?
@i_am_aravindan
4 жыл бұрын
Dear Sir, How to do with multiple segment. For eg: i have page called about and i have sub page of about named as overview Which is like "about/overview" Similarly when i use "overview" is not working only "about" is working. Can you give me a suggestion?
@soyebravat8903
8 жыл бұрын
is there anyway i can use htaccess to replace specific text in the url which i dont want to be viewed?
@adisurd
10 жыл бұрын
Nice info, but a 5 minute tutorial was bloated into a 22 minute, ill prepared ramble.
@winfr34k
14 жыл бұрын
what did you install for your localhost?
@byFeuz
9 жыл бұрын
So then how do you load get variables like site.com/page/id/page_num/edit while php site.com/page or site.com/?p=pagename&id=4147&p_id=2&mode=edit so from get array $_GET["p"] I would have to instead use a numbering system to hold the structure of the vars? like site.com/page/id/page_num/edit basename["1"] to make it dynamic or name manuly to get baseneame['p'] by keywords.
@wimdemortier3281
7 жыл бұрын
Works great! A very nice way of clean URL's. I have one question. I want a url www.site.com/user/name to point the user to following path: www.site.com/user/index.php?user=name. I always get a blank page. When I use www.site.com/user/ this points to the folder user without problem. I can't use a second segment. Any suggestions?
@sirounachouayakh6673
11 жыл бұрын
I need your help , i want to index the url given in a result by google in my project
@DanielJausovec
11 жыл бұрын
Hello. This script work perfect but does not work in ajax request. Do you have any idea why not?
@samhoeun7172
10 жыл бұрын
why Adding a forward slash to the end of my URLs is breaking them?
@YoungBud03
10 жыл бұрын
Forward Slashes is only for directories, you can add this RewriteRule ^(profile/[0-9]+)$ /$1/ [R=301] RewriteRule ^(blog/[0-9]+)$ /$1/ [R=301] To add the ending slash to the URL
@samhoeun7172
10 жыл бұрын
thanks,,, now i want to create a dynamic web with clean url, but i cannot
@PawelKolo
10 жыл бұрын
Use something like this: if (substr($this->url, -1, 1) == "/") { $this->url = substr($this->url, 0, strlen($this->url) - 1); } Where "$this->url" is the full request. Thats remove last slash if any exists.
@frm683600
11 жыл бұрын
Nice tutorial, but when tried this in my loclhost xampp it's not actually working. for example after setting up the simpleUrl class and index.php when visit this URL in my localhost localhost/clean_urls/products/category/12/ it's displaying me as "Object Not Found" anybody has idea? It look like to my it's trying to find the product folder and category folder.
@stagge99
12 жыл бұрын
Glimrande -> sparkling
@_slier
13 жыл бұрын
is there a way to make clean url just using php?
@binodguitarspots2078
7 жыл бұрын
can we hide id but fetch data uniquely....?.
@BaylorBreaksItDown
7 жыл бұрын
+Binod Pal you could create a new column on your record called “slug” which would have a unique index in your database. Generally a slug is all lower case with non alphanumeric characters removed and spaces replaced with dashes. If you want the id to be random you could generate a string with “bin2hex(random_bytes(8))” when creating a new record.
@boutalebbentsair9213
8 жыл бұрын
you can replace $this->site_patch with dir ( $_SERVER ["SCRIPT_NAME"] ) ;
@thegioigiaitri1384
10 жыл бұрын
when i remove ''index.php" in url i've error 404 .
@DevTalk
11 жыл бұрын
Can u upload the .htaccess file pls
@teraro2007
12 жыл бұрын
bro could yo please attach da pdf file ? Thnx
@jowosolo
11 жыл бұрын
where i can download that script
@Daniel-qo9uv
7 жыл бұрын
source pleas i have an error on my source
@marklesterdimpailis379
11 жыл бұрын
thanks.. can you upload the php code.. >_
@DavidCunningham123
4 жыл бұрын
For everyone who wanted the pdf cheet sheet, I found it online here... appletree.or.kr/quick_reference_cards/Apache/mod_rewrite-cheat-sheet-v2.pdf
@MaysMckenzie
9 жыл бұрын
the source code please
@FlevasGR
12 жыл бұрын
lol 2 dislikes......i think thos guys dont know what PHP means....
Пікірлер: 55