I have the following in my .htaccess file
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
Options -Indexes
# preserve bandwidth for PHP enabled servers
<ifmodule mod_php4.c>
php_value zlib.output_compression 16386
</ifmodule>
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteRule ^faq/?$ faq.php
RewriteRule ^about/?$ about.php
RewriteRule ^portfolio/(.*)$ portfolio.php?p=$1
#Error Page___NOT found
ErrorDocument 404 /notfound.php
My portfolio only contains the sections "celebrity","weddings" and "industrial" i.e. only the following pages are valid portfolios:
mysite.com/portfolio/celebrity
mysite.com/portfolio/weddings
mysite.com/portfolio/industrial
I'm having problems with the "portfolio" page in certain situations: When i visit
"mysite.com/portfolio/celebrity"
"mysite.com/portfolio/weddings"
"mysite.com/portfolio/industrial"
everything works fine.If, however, i visit
"mysite.com/portfolio/celebrity/"
"mysite.com/portfolio/weddings/"
"mysite.com/portfolio/industrial/"
(notice the trailing slash),Firefox gives me the following error
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
I've tried replacing the last line with
RewriteRule ^portfolio/(.*)/?$ portfolio.php?p=$1
which doesn't help either, and displays the aforementioned error.
Visiting
"mysite.com/portfolio/some-non-existent-portfolio"
OR
"mysite.com/portfolio/some-non-existent-portfolio/"
doesn't redirect to "notfound.php"
Options -MultiViews