hey all,
in ruby on rails, I know it is very easy to instead of having index.php?article=251 you could just have index/article/251. How would you go about doing this in php to have search engine friendly urls?
thanks
php directory urls
Moderator: General Moderators
Re: php directory urls
Create a file called .htaccess in the directory in which index.php resides. Put this inside it:
Should do the job.
Code: Select all
RewriteEngine On
RewriteRule index/(.*)/(.*) index.php?$1=$2