+ Reply to Thread
Results 1 to 6 of 6

Thread: [Help].htaccess help needed

  1. #1
    x24324gv89 is offline x10Hosting Member x24324gv89 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    3

    Question [Help].htaccess help needed

    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!

  2. #2
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: [Help].htaccess help needed

    Have you uncommented/added

    RewriteEngine On

  3. #3
    x24324gv89 is offline x10Hosting Member x24324gv89 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    3

    Re: [Help].htaccess help needed

    Quote Originally Posted by MaestroFX1 View Post
    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]

  4. #4
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: [Help].htaccess help needed

    Try this:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /

    RedirectMatch "\.php$" http://hostname/index.php

  5. #5
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: [Help].htaccess help needed

    If the .htaccess is in /gd, use

    Code:
    RewriteEngine On
    RewriteBase /gd/
    RewriteRule ^index\.php$ index2.php [L,NC]
    Last edited by descalzo; 04-12-2011 at 12:56 PM.
    Nothing is always absolutely so.

  6. #6
    x24324gv89 is offline x10Hosting Member x24324gv89 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    3

    Thumbs up Re: [Help].htaccess help needed

    Quote Originally Posted by descalzo View Post
    If the .htaccess is in /gd, use

    Code:
    RewriteEngine On
    RewriteBase /gd/
    RewriteRule ^index\.php$ index2.php [L,NC]
    Thanks you so much it worked!

+ Reply to Thread

Similar Threads

  1. htaccess changes
    By christiand14 in forum Free Hosting
    Replies: 1
    Last Post: 11-13-2010, 12:21 PM
  2. .htaccess + php.ini
    By extolcpusername in forum Free Hosting
    Replies: 1
    Last Post: 01-15-2010, 08:51 AM
  3. .htaccess
    By AttackBunnyPro in forum Programming Help
    Replies: 2
    Last Post: 10-29-2008, 01:49 AM
  4. .htaccess?
    By sala514 in forum Free Hosting
    Replies: 2
    Last Post: 08-04-2008, 08:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers