#RewriteEngine On
#RewriteBase /csnew/

I commented out those two lines in my HTACCESS file, whenever I type in my domain address with a directory and/or file added on that doesn't exist, it keeps loading my web site because it's constantly searching within the directory /CSNEW/ but commenting it out, isn't preventing this ?

Changing Permissions and delete directories.

<Files .htaccess>
order allow,deny
deny from all
</Files>

From my understanding the above code, is preventing me from changing the permissions or deleting any directories. I commented it out, but I can't delete or change the permissions of any directory or file ?

Member Avatar

LastMitch

whenever I type in my domain address with a directory and/or file added on that doesn't exist, it keeps loading my web site because it's constantly searching within the directory /CSNEW/ but commenting it out, isn't preventing this ?

You need to redirect the pages to the new pages:

//This will redirected the whole website from old to new.
Redirect /home/path/public_html/ http://www.demo.domain.com/

//This will redirected certain pages
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^oldpage\.html$ "http\:\/\/www\.demo.domain\.com\/newpage\.php" [R=301,L]

I don't want to redirect pages to new pages. I want to know why, if I go to a page or a page within a directory on the server that doesn't exist, it continues to load up my web page instead of firing a 404 message ?

Member Avatar

LastMitch

I don't want to redirect pages to new pages. I want to know why, if I go to a page or a page within a directory on the server that doesn't exist, it continues to load up my web page instead of firing a 404 message ?

It shouldn't at all. 404 pages means no pages exist on that server.

Another words remove the link that is link to that page that you do not want the page to go to then the 404 page will appear.

I assume you change the nav menu bar to the new pages if you didn't change it then that page will come up instead of the 404 pages.

Sorry, I didn't understand :)