Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 09:51:28 AM

Pages: [1]   Go Down
  Print  
Author Topic: htaccess redirect  (Read 1751 times)
Eudemon
Newbie
*
Offline Offline

Posts: 2


« on: June 18, 2011, 01:49:54 PM »

i want to make an htaccess redirects everything on my root directory but not folders
for example mysitexxxxx.com/some.php to mysitexxxxx.com/index.php
also need another example that redirects to a folder for example /forum/

can someone write me one? thx
Logged
Malin Cenusa
Support
Pong! (the videogame) Master
*****
Offline Offline

Posts: 21


WWW
« Reply #1 on: June 18, 2011, 03:04:43 PM »

To redirect all .php file requests back to index.php all you need to do is have this code within your .htaccess:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

Logged
Eudemon
Newbie
*
Offline Offline

Posts: 2


« Reply #2 on: June 18, 2011, 06:21:04 PM »

that works great, thanks a lot
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: