.htaccess - PHP: Custom Designed URL -
im trying send users custom url's based on profile information. instead of sending user www.website.com/profile/john.doe want send them www.website.com/john.doe - when try remove "profile" portion of url. error saying
the john.doe_controller.php file not found.
unless im understanding wrong, dont want create new controller file every user. there .htaccess rule use this.
thanx in advance.
you can use following code in root/.htaccess :
rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.+)$ /profile/$1 [nc,l,qsa]
Comments
Post a Comment