So this is my .htaccess so far:
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName site.com
#Redirect 301 / http://www.google.com/
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^([^/\.]+)/?$ /index.php?page=$1 [L]
RewriteCond %{HTTP_HOST} ^site.com
RewriteRule (.*) http://www.site.com/$1 [R=301,L]
ErrorDocument 404 /404.html
What I am trying to do is the following:
index.php?page=pagesite -> site.com/pagesite
But if I go to site.com/images it doesnt go to /images it goes to index.php?page=images
How do I fix that?
Also, is there anyway that if “pagesite” is not in /includes/pages/ it redirects to the 404?
Thanks
I’m assuming you’re trying to return images and other plain files returned directly and not by PHP:
This is my typical setup.
As for 404, since everything else goes to index.php, it should be returned by your PHP code.