Page 1 of 1

.HTACCESS redirect

Posted: Fri Oct 22, 2010 10:29 am
by J0kerz
Hi there,

I have a code in my .htacces file to redirect all pages of my website to my homepage for a short amount of time. The code is as follow:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteRule ^(.+)\.php$ / [R=302,L]
When I add this piece of code, my website wont load at all.

Is there anything wrong with my syntax or any php things I should setup?

Thanks guys,

Re: .HTACCESS redirect

Posted: Fri Oct 22, 2010 10:34 am
by twinedev
I think, but am not sure, that you actually for a rewrite rule need the actual file name you are sending people to instead of just the / do /index.php (or whichever one you are using).

-Greg

Re: .HTACCESS redirect

Posted: Fri Oct 22, 2010 1:52 pm
by J0kerz
The above code worked well for the last few months but now it doesnt seem to work anymore.

It is strange, what could be the issue?