View Single Post
Old 12-18-2008, 09:08 PM  
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
I have this in .htaccess

PHP Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond 
%{HTTP_HOST} !^www\.domain\.com
RewriteRule 
(.*) http://www.domain.com/$1 [R=301,L]
RewriteRule ^index.php?page=([0-9]+)&cat=([0-9]+)$  index.php?page=$1&cat=$[L]
RewriteCond %{QUERY_STRING} .  
RewriteRule ^/?$ http://mysponsors404page.com [L] 

Now.. my site dynamically generates archives as more galleries are added, and so have

domain.com
domain.com/index.php?page=1
domain.com/index.php?page=2 and so on as many pages as I have..

Problem I have though is when someone types in query such as domain.com?anything it still shows index and I want it to go to 404, which the above .htaccess solved when I added it, however..

when it is domain.com/index.php?anything it does not 404 and the last thing is about pages that have yet to be created and do not exist yet..so, how would I make page=18 404 if I only have say 15 pages?

Last edited by spacedog; 12-18-2008 at 09:10 PM..
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote