Results 1 to 4 of 4
  1. #1

    Dynamic URL to Dynamic URL redirect with htaccess

    Hey everyone,

    due to switching of hosts messing up the hierarchies of some pages, had to switch these PHP pages

    domain.com/index.php?id="tonsofpages"

    to

    domain.com/newindex.php?id="tonsofpages"

    is this possible, and if so, how can i do this with htaccess?

    thanks so much for any help!

  2. #2
    Join Date
    Jun 2009
    Posts
    36
    Hi,

    You can try this

    RewriteCond %{HTTP_HOST} ^domainname\.com/index.php?id=$ [NC]

    RewriteRule ^(.*)$ http://www.domainmae.com/indexnew.php?id=$1 [R=301,L]


    Hope this works for you!

    Cheers,

    Maneet Puri
    Lexolution IT Services

  3. #3
    Join Date
    Dec 2007
    Location
    UK
    Posts
    948
    you could also use the PHP command
    <?php header("location: url"); ?>

    example:
    <?php header("location: www.cr-j.co.uk/index.php"); ?>
    Follow me on Twitter: @conrjac

  4. #4
    thanks so much for all your helpful suggestions!

    i unfortunately have not been able to get them to work...

Similar Threads

  1. Dynamic URL to Dynamic URL redirect with htaccess
    By beridiculous in forum Programming Discussion
    Replies: 2
    Last Post: 11-10-2009, 09:57 AM
  2. .htaccess redirect for dynamic pages
    By QiQ - QiQ in forum Programming Discussion
    Replies: 2
    Last Post: 05-20-2009, 06:58 PM
  3. Please help redirect dynamic url with htaccess
    By daniellosada in forum SEO / SEM Discussions
    Replies: 2
    Last Post: 04-10-2009, 02:09 PM
  4. 301 redirect dynamic to dynamic
    By techguru in forum Programming Discussion
    Replies: 1
    Last Post: 01-20-2009, 09:43 PM
  5. htaccess redirect dynamic URL to dynamic URL
    By Badie in forum Programming Discussion
    Replies: 16
    Last Post: 01-17-2008, 02:01 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
  •