Page 1 of 2 12 LastLast
Results 1 to 25 of 45
  1. #1
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Htaccess File Problem
    I am trying to fix 2 errors found in my webmasters tools in the htaccess file. I have about 10 fixed, however 2 will not work and I cut and pasted exactly what I had and changed the urls and still no luck! I am banging my head against the wall! Is it possible someone can send me a PM and help me with this real quick?
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  2. #2
    Moderator BurgerBoy's Avatar
    Join Date
    January 18th, 2005
    Location
    jacked by sylon www.sylonddos.weebly.com
    Posts
    9,618
    Why don't you post the problem code here?

    Vietnam Veteran 1966-1970 USASA
    ABW Forum Rules - Advertise At ABW

  3. Thanks From:

  4. #3
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Code:
    Redirect 301 "/creditrepair/?p=7" http://easybadcreditrepair.com
    Doesn't redirect when you go to that link. Driving me up the wall!!!!
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  5. #4
    ABW Ambassador I.M.O.G.'s Avatar
    Join Date
    February 19th, 2011
    Location
    Rootstown, OH
    Posts
    1,096
    The ?p=7 is a query string, which I believe is causing your problem. Your working redirects do not include a query string.

    You need to use mod_rewrite to handle query strings, which means using a rewritecond, rewriterule, and a properly escaped regular expression. "Rewritecond" is like an if...then...do statement. If there's a query string, and its p=7, then rewriterule is blahblahblah.
    Matt Bidinger
    Online Community Engagement

  6. #5
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Should be something along these lines:

    http://www.abestweb.com/forums/1066480-post21.html
    Salty kisses, Sandy toes, and a Pirate's heart...

  7. #6
    ABW Ambassador I.M.O.G.'s Avatar
    Join Date
    February 19th, 2011
    Location
    Rootstown, OH
    Posts
    1,096
    Convergence, do you think it should look like the following? I understand the basics of this stuff, but the devil is in the details as they say, and I always have to dick around with syntax to get what I want:

    RewriteCond %{QUERY_STRING} p=7
    RewriteRule index.php http://easybadcreditrepair.com [R=301,L]
    Last edited by I.M.O.G.; June 13th, 2011 at 09:57 PM. Reason: inserted noparse bbcode so the URL wouldn't be rewritten by VBSEO
    Matt Bidinger
    Online Community Engagement

  8. Thanks From:

  9. #7
    ABW Ambassador 2busy's Avatar
    Join Date
    January 17th, 2005
    Location
    Tropical Mountaintop
    Posts
    5,636
    More explicit instructions from cusimano the great are in this thread: http://www.abestweb.com/forums/abest...ce-132378.html
    Instructions starting at post #9
    Good luck.

  10. #8
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Quote Originally Posted by I.M.O.G. View Post
    Convergence, do you think it should look like the following? I understand the basics of this stuff, but the devil is in the details as they say, and I always have to dick around with syntax to get what I want:

    RewriteCond %{QUERY_STRING} p=7
    RewriteRule index.php http://easybadcreditrepair.com [R=301,L]
    Matt, that's what I was thinking.

    Quote Originally Posted by 2busy View Post
    More explicit instructions from cusimano the great are in this thread: http://www.abestweb.com/forums/abest...ce-132378.html
    Instructions starting at post #9
    Good luck.
    2busy, I don't know if silver93350 is trying to cloak a link, which is what I saw in your referenced thread...
    Salty kisses, Sandy toes, and a Pirate's heart...

  11. Thanks From:

  12. #9
    ABW Ambassador 2busy's Avatar
    Join Date
    January 17th, 2005
    Location
    Tropical Mountaintop
    Posts
    5,636
    The thread has detailed instructions on how to use htaccess to rewrite URLs. It is not only for cloaking links although Rewrite does that too. I used that thread because the only place with more details that I know of is the Friends of Apache site, and it is less easy to follow.

  13. Thanks From:

  14. #10
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Hey thanks for all the help, however I still can't get it to work . Here is what I have for my entire htaccess file. Please note I added the lines you said on 9 and 10 and have the redirect 301 there too. Not sure if I need it there or not, but didn't work with and without. Any thoughts?

    Code:
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} !^/robots\.txt$ [NC]
    RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
    RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC]
    RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]
    
    RewriteCond %{QUERY_STRING} p=7
    RewriteRule index.php http://easybadcreditrepair.com [R=301,L] 
    
    Redirect 301 "/creditrepair/?p=7" http://easybadcreditrepair.com
    Redirect 301 "/sky-blue-review/' rel='external nofollow" http://easybadcreditrepair.com/sky-blue-review/
    Redirect 301 "/credit-repair-services/' rel='external nofollow" http://easybadcreditrepair.com/credit-repair-services/
    Redirect 301 "/lexington-law-review/' rel='external nofollow" http://easybadcreditrepair.com/lexington-law-review/
    Redirect 301 "/ovation-review/' rel='external nofollow" http://easybadcreditrepair.com/ovation-review/
    Redirect 301 "/credit-repair-magic-review/' rel='external nofollow" http://easybadcreditrepair.com/credit-repair-magic-review/
    Redirect 301 "/test-2/" http://easybadcreditrepair.com
    Redirect 301 "/credit-repair- services/" http://easybadcreditrepair.com/credit-repair-services/
    Redirect 301 "/unsecured-loans-good-for-good-credit/' rel='external nofollow" http://easybadcreditrepair.com/unsecured-loans-good-for-good-credit/
    
    
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    </IfModule>
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  15. #11
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Couple of things:

    This a WP install?


    Also,
    Code:
    Redirect 301 "/creditrepair/?p=7" http://easybadcreditrepair.com
    should not be there if you are using our suggested code above
    Last edited by Convergence; June 14th, 2011 at 05:52 PM.
    Salty kisses, Sandy toes, and a Pirate's heart...

  16. #12
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    yes it is a WP install.

    Removed the code:
    Code:
    Redirect 301 "/creditrepair/?p=7" http://easybadcreditrepair.com
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  17. #13
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    still won't redirect right
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  18. #14
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    and /creditrepair/?p=7 is correct? Not /creditrepair/?s=7 ?
    Salty kisses, Sandy toes, and a Pirate's heart...

  19. #15
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Yes this is the url that is not found:

    Code:
    http://easybadcreditrepair.com/creditrepair/?p=7
    Last edited by silver93350; June 14th, 2011 at 06:00 PM.
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  20. #16
    ABW Ambassador 2busy's Avatar
    Join Date
    January 17th, 2005
    Location
    Tropical Mountaintop
    Posts
    5,636
    If you are moving an entire directory just do an overall 301 Redirect:
    Code:
    Redirect 301 / http://www.example.com/
    in that directory's .htaccess file (not in your domain htaccess file) so that everything in that directory will redirect to the new domain.

  21. #17
    ABW Ambassador I.M.O.G.'s Avatar
    Join Date
    February 19th, 2011
    Location
    Rootstown, OH
    Posts
    1,096
    If you are moving just that query string like we were talking about previously, I would try something like the following (tossing darts here, partially blindfolded):

    RewriteCond %{QUERY_STRING} ^p=7$
    RewriteRule ^creditrepair/$ http://easybadcreditrepair.com [R=301,L]
    Last edited by I.M.O.G.; June 14th, 2011 at 06:17 PM.
    Matt Bidinger
    Online Community Engagement

  22. #18
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Quote Originally Posted by I.M.O.G. View Post
    If you are moving just that query string like we were talking about previously, I would try something like the following (tossing darts here, partially blindfolded):

    RewriteCond %{QUERY_STRING} ^p=7$
    RewriteRule ^creditrepair/$ http://easybadcreditrepair.com [R=301,L]

    Just tried it still noting .
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  23. #19
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Try this on for size

    Code:
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^creditrepair\/?$ "http\:\/\/easybadcreditrepair\.com" [R=301,L]
    Salty kisses, Sandy toes, and a Pirate's heart...

  24. #20
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Quote Originally Posted by Convergence View Post
    Try this on for size

    Code:
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^creditrepair\/?$ "http\:\/\/easybadcreditrepair\.com" [R=301,L]
    still no luck.
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  25. #21
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Interesting because it's working here lol.

    Hmmmmm...
    Salty kisses, Sandy toes, and a Pirate's heart...

  26. #22
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Quote Originally Posted by Convergence View Post
    Try this on for size

    Code:
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^creditrepair\/?$ "http\:\/\/easybadcreditrepair\.com" [R=301,L]
    Quote Originally Posted by Convergence View Post
    Interesting because it's working here lol.

    Hmmmmm...
    u mean when you go to:

    Code:
    http://easybadcreditrepair.com/creditrepair/?p=7
    it works there? Maybe I will wait a sec and try again
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  27. #23
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    No, it means on my test install

    www.testinstalldomain.com/creditrepair/?p=7"

    redirected to:

    http://easybadcreditrepair.com
    Salty kisses, Sandy toes, and a Pirate's heart...

  28. #24
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Quote Originally Posted by Convergence View Post
    No, it means on my test install

    www.testinstalldomain.com/creditrepair/?p=7"

    redirected to:

    http://easybadcreditrepair.com
    hmm wonder why it still isn't working here. Would you like my FTP? I can pay you paypal to give it a try? Very frustrated with it.
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  29. #25
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    I can understand your frustration - .htaccess can be tricky. Even where you have the code located within your .htaccess file can make a difference.

    I'm getting ready to leave for dinner so will not be able to use your FTP access. I'm not sure that would help at the moment, anyway.

    I'll see if I have time to create another test install and copy your .htacess contents directly into mine - see what happens. In the meantime, maybe someone else will come up with your solution
    Salty kisses, Sandy toes, and a Pirate's heart...

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. htaccess focing download of file NOT WORKING
    By Affiliate Ian in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: February 18th, 2005, 03:48 PM
  2. Problem with big .htaccess file?
    By Affiliate Ian in forum Midnight Cafe'
    Replies: 2
    Last Post: August 20th, 2004, 02:40 PM
  3. .htaccess.html file...help?
    By hershey in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: January 9th, 2002, 07:44 PM

Tags for this Thread

Posting Permissions

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