Rename url hiding file extension
Posted
by
Anusri Roy Chowdhury
on Server Fault
See other posts from Server Fault
or by Anusri Roy Chowdhury
Published on 2011-11-14T08:52:52Z
Indexed on
2011/11/15
1:57 UTC
Read the original article
Hit count: 554
I want to show url http://some.com/designit/portfolio.php?cat=website&subcat=nature as http://some.com/designit/portfolio/website/nature. cat may pe presentor may not.also subcat may present or not I have put .htaccess file in designit folder and code in it is as follows:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
RewriteRule ^portfolio/?$ portfolio.php[NC,QSA]
RewriteRule ^portfolio/([a-zA-Z0-9_-]+)/?$ portfolio.php?cat=$1[L,NC,QSA]
it is showing ..some.com/designit/portfolio.php as ..some.com/designit/portfolio but it is not showing ..some.com/designit/portfolio.php?cat=website as ..some.com/designit/portfolio/website.Showing error "Internal Server Error.The server encountered an internal error or misconfiguration and was unable to complete your request." please help me to complete this code.
© Server Fault or respective owner