View Full Version : Whats wrong with my .htaccess


soulja90
02-11-2008, 01:01 PM
Hi Guys,

I've setup a site using wordpress and custom wordpress templates.

Everything worked fine.

When I did the mod rewrite using .htacess - it still all works BUT . . .

Now every page, if even it doesn't exist, get redirected to a page that does.

If i type in a url www.mysite.com/co - keep in mind 'co' doesn't exist - it redirects to 'computer programs' - a page that does exist.

I just want it to be normal.

Anyway around this?

This is my .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Paz
03-15-2008, 04:56 AM
That's what the htaccess is supposed to do!

This part checks to see if the file or directory exists;
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

And if they don't, visitors are taken here;

RewriteRule . /index.php [L]

ovidiu
10-29-2009, 06:07 AM
In Wordpress if the page do not exist there are 2 possibilities, custom 404 error page or redirection to index.