[Help].htaccess help needed

x24324gv89

New Member
Messages
3
Reaction score
0
Points
0
Hello,
I am new here and completely new to php coding and .htaccess.I readed on net that if you use mod_rewrite func you can redirect any file to another for ex (index.php redirect to index2.php)

So,i wanted to try it but it does not redirect to index2.php from index.php

.htaccess file
Code:
RewriteBase /
RewriteRule ^index.php$ index2.php [L,NC]
Note:All 3 files (.htaccess,index.php,index2.php are in a same folder called gd...

Thanks!
 

MaestroFX1

Community Advocate
Community Support
Messages
1,577
Reaction score
60
Points
0
Have you uncommented/added

RewriteEngine On
 

x24324gv89

New Member
Messages
3
Reaction score
0
Points
0
Have you uncommented/added

RewriteEngine On
Yes,i did but it cant help even after that i cant access to gd directory on my site using browser it give me a 404 not found error D:

my .htaccess with RewriteEngine On
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ index2.php [L,NC]
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
If the .htaccess is in /gd, use

Code:
RewriteEngine On
RewriteBase /gd/
RewriteRule ^index\.php$ index2.php [L,NC]
 
Last edited:
Top