Search Engine Friendly URLs in PHP Without Mod_Rewrite
I wrote a tutorial on how to make nice looking, search engine friendly URLs in PHP without using Mod_Rewrite.
Basically you can make a URL that normally looks like this:
thanks, definitely would look into it.
You don't necessarily need to get rid of the file from the string for instance
Going on, this might be an appealing way of circumventing some of the problems associated with mod_rewrite but let's say your system depends on modules ( as do many ) so that you're unfriendly url looks like so
Your friendly-esk URL would look like so
Using mod_rewrite you can achieve domain.com/login which looks still more appealing then any of the url's your method. I'm not trying to defame your attempt to come up with alternatives to mod_rewrite merely state that mod_rewrite is much more flexible and gives much more control for urls.
@Enfernikus: Yes. You are definitely right, Mod_Rewrite is much more powerful than this method. But, the two methods could easily be used together to be more powerful that ether one alone! Again, a good example of this would be how CodeIgniter handles URLs.
You could use the following Mod_Rewrite code in a .htaccess file to remove the index.php:
help me about mod_rewrite
i have a problem to use this module for change my link to seo.
i have a simple link:www.domain.com/product_desc.php?id=number
I use this rules:
RewriteRule ^product/([A-Za-z0-9-]+)/?$ product_desc.php?id=$1 [NC,L]
I change ([0-9]+) or (.*) or ([^.]+)and etc..
and i test similar flag too.[QSA]..
but not successfull because my order page show without picture and css and was added product/ in first other links in page
please help me to skip
i use - instead / in this method it worked.why?
I usually make a class that works either way and auto checks if the url is with or without mod_rewrite. Could post a tutorial on making such class if people want.
Izym, I would be really interested in that tutorial, since I am also barely starting in this url rewrite realm.
|All times are GMT. The time now is 06:44 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0