Creating Clean URLS using PHP

preview_player
Показать описание
How to make clean urls with PHP and .htaccess
Рекомендации по теме
Комментарии
Автор

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!

erdesigns
Автор

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.

rusofob
Автор

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

ivanorezac
Автор

So then how do you load get variables  like
while php  site.com/page
so from get array $_GET["p"] I would have to instead use a numbering system to hold the structure of the vars? basename["1"] to make it dynamic or name manuly to get baseneame['p'] by keywords.

royallan
Автор

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?

i_am_aravindan
Автор

@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

_slier
Автор

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: 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?

wimdemortier
Автор

is there anyway i can use htaccess to replace specific text in the url which i dont want to be viewed?

soyebravat
Автор

And how do you make it work for search bars that use GET?

royallan
Автор

Whole Url cleans that I have seen before and also now have bug.This bug is about if User going to write It will run Like ...product/category/12

ibrahimhasanov
Автор

what did you install for your localhost?

winfrk
Автор

I used ApacheFriends' XAMPP for Macintosh.

BaylorBreaksItDown
Автор

Nice info, but a 5 minute tutorial was bloated into a 22 minute, ill prepared ramble.

adisurd
Автор

Thanks for this tutorial but it would be nicer if you zoom in to the text portion instead of showing the entire desktop.

leessiloue
Автор

Hello.
This script work perfect but does not work in ajax request.
Do you have any idea why not?

DanielJausovec
Автор

I need your help, i want to index the url given in a result by google in my project

sirounachouayakh
Автор

is there a way to make clean url just using php?

_slier
Автор

why Adding a forward slash to the end of my URLs is breaking them? 

samhoeun
Автор

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 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.

frm
Автор

can we hide id but fetch data uniquely....?.

binodguitarspots
join shbcf.ru