SEO Friendly URL to Dynamic URL using PHP?

Why not to route all requests to the index. Php with mod_rewrite and use PHP to write the routing logic, which seems way more reliable way than writing distinct rewrite rules?

Why not to route all requests to the index. Php with mod_rewrite and use PHP to write the routing logic, which seems way more reliable way than writing distinct rewrite rules? As simple .

Htaccess as this one RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME}! -f RewriteCond %{REQUEST_FILENAME}! -d RewriteRule ^(.*)$ index.

Php? Request=$1 QSA,L And few lines of PHP code in the index. Php $client_name = strtok($_SERVER'HTTP_HOST',"."); list ($cat,$subcat) = explode("/",trim($_GET'request',"/")).

Yes, but I want to keep the URL as the pretty one, but need to pass it as the "cat=". – John Swaringen May 26 '10 at 17:37 @John Swaringen: The URL in the browser will remain the same. Only behind the scenes will this conversion take place.

– webbiedave May 26 '10 at 17:40 I use the method described here. Mod rewrite to hide the index. Php and then build a routing system in PHP - this lets you abstract the rules so that you can have separate routers for different sections of the site.

Look at how Joomla handles routers - you specify a builder and parser. When parsing you simply loop through the various segments and assign each one to a value so you can still have "cat=blah" – Jarrod May 26 '10 at 17:41.

In addition to Col. Shrapnel's answer, at least slim the selection down: RewriteRule ^/(-a-zA-Z0-9_+)/(0-9+)$ index. Php?

Function_name=$1&cat=$2 L,QSA # domain. Com/cat_name/23 is sent to the server as domain. Com/index.

Php? Function_name=cat_name&cat=23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions