hojo
September 7th, 2006, 11:18 PM
Hey folks,
My site sends a 200 status code rather than the 404. All non-recognized urls are taken over by the rewrite and sent to the index.
I currently have in my htaccess:
:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
and read I need to add
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L, R=301]
and
Options +FollowSymLinks
RewriteEngine on
# index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3, 9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301, L]
From what I know, the first code permits for my php files to be read properly. The second redirects inproper inquiries such as http//dotcom and wwwdotcom to http//wwwdotcom. The last sends http//wwwdotcom/indexdotphp to http//wwwdotcom.
When trying to do this, I'm given an internal 500 error. I listed RewriteEngine on just once, and pasted the rest subsequently under.
Any help is most appreciated, as I've been struggling with this issue for some time now. Thanks for reading!
My site sends a 200 status code rather than the 404. All non-recognized urls are taken over by the rewrite and sent to the index.
I currently have in my htaccess:
:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
and read I need to add
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L, R=301]
and
Options +FollowSymLinks
RewriteEngine on
# index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3, 9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301, L]
From what I know, the first code permits for my php files to be read properly. The second redirects inproper inquiries such as http//dotcom and wwwdotcom to http//wwwdotcom. The last sends http//wwwdotcom/indexdotphp to http//wwwdotcom.
When trying to do this, I'm given an internal 500 error. I listed RewriteEngine on just once, and pasted the rest subsequently under.
Any help is most appreciated, as I've been struggling with this issue for some time now. Thanks for reading!