Aloha everyone,
I'm in the final stages of my site now, very excited
I turned on pretty urls and generated a htacess file, but when after uploading the file I get 404's on every single subpage and blog posts. I can't understand what is wrong? Anyone have any clues?
I'm in the final stages of my site now, very excited


- Code: Select all
Options +SymLinksIfOwnerMatch -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it RewriteBase /subdomain1/subdomain2
RewriteBase /
#If you wish to use a custom 404 page, place a file named 404.php in your website's root and uncomment the line below.
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it ErrorDocument 404 /subdomain1/subdomain2/404.php
#ErrorDocument 404 /404.php
#If your site begins with 'www', uncomment the following two lines
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#DO NOT EDIT BELOW THIS
RewriteRule ^index.php$ "" [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#video-gallery.php
RewriteRule ^video-gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^video-gallery/$ video-gallery.php [L,QSA]
RewriteRule ^video-gallery/.*?([^\.\/]*)\.html$ video-gallery.php?pname=$1 [L,QSA]
RewriteRule ^video-gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ video-gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^video-gallery/[^\.]*?([^/\.]*)/$ video-gallery.php?fname=$1 [L,QSA]
RewriteRule ^video-gallery/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#photo-gallery.php
RewriteRule ^photo-gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^photo-gallery/$ photo-gallery.php [L,QSA]
RewriteRule ^photo-gallery/.*?([^\.\/]*)\.html$ photo-gallery.php?pname=$1 [L,QSA]
RewriteRule ^photo-gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ photo-gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^photo-gallery/[^\.]*?([^/\.]*)/$ photo-gallery.php?fname=$1 [L,QSA]
RewriteRule ^photo-gallery/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#gallery.php
RewriteRule ^gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^gallery/$ gallery.php [L,QSA]
RewriteRule ^gallery/.*?([^\.\/]*)\.html$ gallery.php?pname=$1 [L,QSA]
RewriteRule ^gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)/$ gallery.php?fname=$1 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#blog_tags.php
RewriteRule ^blog_tags$ "$0/" [R=301,L,QSA]
RewriteRule ^blog_tags/$ blog_tags.php [L,QSA]
RewriteRule ^blog_tags/.*?([^\.\/]*)\.html$ blog_tags.php?pname=$1 [L,QSA]
RewriteRule ^blog_tags/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ blog_tags.php?d=$1$2$3 [L,QSA]
RewriteRule ^blog_tags/[^\.]*?([^/\.]*)/$ blog_tags.php?fname=$1 [L,QSA]
RewriteRule ^blog_tags/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#blog.php
RewriteRule ^blog$ "$0/" [R=301,L,QSA]
RewriteRule ^blog/$ blog.php [L,QSA]
RewriteRule ^blog/.*?([^\.\/]*)\.html$ blog.php?pname=$1 [L,QSA]
RewriteRule ^blog/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ blog.php?d=$1$2$3 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)/$ blog.php?fname=$1 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#index.php
RewriteRule ^.*?([^\.\/]*)\.html$ ?pname=$1 [L,QSA]
RewriteRule ^([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ ?d=$1$2$3 [L,QSA]
RewriteRule ^[^\.]*?([^/\.]*)/$ ?fname=$1 [L,QSA]
RewriteRule ^\w[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
</IfModule>