Thread: .htaccess help!

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    red flag .htaccess help!

    Hi. I am trying to re direct my URLS to one particular one.

    In order to do this i need to use a 301 redirect. i tried changing my .htaccess file.

    Contents of .htaccess

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^gamenet\.net\.au\/?$ "http\:\/\/gamenet\.net\.au\/" [R=301,L]

    redirect 301 http://gamenet.net.au/ http://www.gamenet.net.au/



    I tried adding the bottom line of code to redirect http://gamenet.net.au/ to http://www.gamenet.net.au/ however when i type in the first url it does not re-direct my to the latter.

    I am not sure that i used the correct code. could someone please help me out? it would be greatly appreciated. Thanks!
    Last edited by gamenet; 16 Oct 2010 at 12:29 PM. Reason: typo

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: .htaccess help!

    Try this
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www.your_domain.com$
    RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    Default Re: .htaccess help!

    mmm i am a bit confused. could you please insert my two URLs i am wanting to redirect into that code? thanks :)

  4. #4
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    Default Re: .htaccess help!

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^gamenet\.net\.au\/?$ "http\:\/\/gamenet\.net\.au\/" [R=301,L]


    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^http://gamenet.net.au/$
    RewriteRule ^(.*)$ http://www.gamenet.net.au/$1 [R=301]


    I added that code. and look what it did.
    gamenet.net.au

  5. #5
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    Default Re: .htaccess help!

    Please help. i want to fix it urgently.

  6. #6
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    Default Re: .htaccess help!

    I could not leave my site like that so here is what is said.

    The page isn't redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    Do you have any idea what i did wrong?

    Sorry - for the multiple posts.

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: .htaccess help!

    Try this code, exactly as is.

    RewriteEngine ON

    RewriteCond %{HTTP_HOST} ^gamenet\.net\.au [NC]
    RewriteRule ^(.*)$ http://www.gamenet.net.au/$1 [R=301,NC,L]

  8. #8
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    Default Re: .htaccess help!

    you sir. are a genius.

    Would you be kind enough to explain a bit on how you did it. with the "/" etc.
    i am wanting to add another one to the equation. this time i'm trying to change

    http://www.gamenet.net.au/index.php?...ndex&cPath=106

    to somethign like

    http://www.gamenet.net.au/xbox360

  9. #9
    Join Date
    Jun 2009
    Posts
    187
    Plugin Contributions
    0

    Default Re: .htaccess help!

    I'm not sure if this is what you need, but using a free mod like this http://www.zen-cart.com/index.php?ma...roducts_id=231 should take you on the right path. If you go to the free zen cart addons and search for SEO you will see some more mods that re-write the standard url's to something more SEO friendly. I think one of them allows you to do something like /xbox360 but I could be wrong.

    Quote Originally Posted by gamenet View Post
    you sir. are a genius.

    Would you be kind enough to explain a bit on how you did it. with the "/" etc.
    i am wanting to add another one to the equation. this time i'm trying to change

    http://www.gamenet.net.au/index.php?...ndex&cPath=106

    to somethign like

    http://www.gamenet.net.au/xbox360

  10. #10
    Join Date
    Apr 2010
    Posts
    149
    Plugin Contributions
    0

    Default Re: .htaccess help!

    Yes, that is somewhat what i am after, however i would much prefer to be able to code it myself, like rob just did :)
    Thanks tho! :)
    Last edited by gamenet; 16 Oct 2010 at 04:55 PM. Reason: error

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Help Please - need help with .htaccess file
    By timb22 in forum General Questions
    Replies: 14
    Last Post: 6 Apr 2015, 08:21 PM
  2. help with .htaccess?
    By JohnBoyCR in forum General Questions
    Replies: 1
    Last Post: 16 Jul 2009, 07:05 PM
  3. .htaccess help
    By neighbornick in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Jun 2009, 02:16 PM
  4. .htaccess overide help
    By bilbothecat in forum General Questions
    Replies: 2
    Last Post: 5 May 2009, 01:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg