for some days now I have been trying to make a simple mod_rewrite rule to create friendly URLs, my web host have mod_rewrite enabled but I just can't get it to work.
All the next questions where posted by me:
None of the answers worked, so I'm thinking now using simple php routing instead and I wanted to know if there is a big performance or SEO difference between the two. And if there is, maybe you know how to fix the mod_rewrite problems posted in my questions.
Thanks.
If you're using PHP routing for PHP files only, it would be no problem performance-wise: The interpreter will get started anyway, a new process started, memory allocated etc.
But if you are planning to route requests for static resources like images and style sheets as well, however, don't use PHP routing under any circumstance. It's way too resource-intensive and not what PHP was built for.
I'd say
mod_rewrite
is the better, leaner solution and it's worth trying to figure it out.I prefer routing that kicks in when the requested file doesn't exist, like this in Lighttpd:
Provided you find out how to do this in Apache, your script would be more cross webserver compatible, since Apache's mod_rewrite conditions in .htaccess won't work on Lighttpd.