Forum

Thread tagged as: Question, Problem, Error

.htacces error

Hi, I have a list of pictures by categories (List & Detail) but apparently the .htaccess file is not working as it should and that the page does not exist: "Not Found The requested URL /category/stock/news/ was not found on this server" but whether there are pages (category.php...). Thanks in advance.

<IfModule mod_rewrite.c>
Options -Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^photo/([a-zA-Z0-9-/]+)$ /photo.php?s=$1 [L] 
RewriteRule ^category/([a-zA-Z0-9-/]+)$ /category.php?cat=$1 [L]
RewriteRule ^gallery/([a-zA-Z0-9-/]+)$ /gallery.php?s=$1 [L] 
RewriteRule ^gallerycat/([a-zA-Z0-9-/]+)$ /gallerycat.php?cat=$1 [L]


# Redirect to PHP if it exists.
# e.g. example.com/foo will display the contents of example.com/foo.php

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L,QSA]

</IfModule>
alex s

alex s 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Which rule are you expecting to match that, and what actual file are you expecting it to match?

alex s

alex s 0 points

Hi Rachel, I'm sorry, the problem is the name of file, I was wrong: .htacces instead of .htaccess :(

Thanks a lot.