.htaccess, don't understand why its not functioning

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
definewebsites
Forum Newbie
Posts: 19
Joined: Thu May 01, 2008 9:51 pm

.htaccess, don't understand why its not functioning

Post by definewebsites »

Hi there,

I have the following entries in a .htaccess in the root of my website:

Code: Select all

 
RewriteEngine on
RewriteRule ^portfolio/([0-9])$ /portfolio/$1/ [R] 
RewriteRule ^portfolio/([0-9])/$ /portfolio.php?page=$1
 
It works when I enter this into the browser: mysite.com/portfolio

However, when I enter this: mysite.com/portfolio/2 , then I get an error message saying "No input file specified."

Any ideas?

Thanks
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: .htaccess, don't understand why its not functioning

Post by JAB Creations »

This is a PHP code forum, your post is about Apache, this I would recommend in the future when posting in regards to Apache to post in the Miscellaneous forum.

I'm ok with Apache though all I can guess is that you may already have a .htaccess file in your sub-directory that is overriding this one?
Post Reply