• Resolved lauriepk

    (@lauriepk)


    Hi,

    There was a rewrite code somewhere in my .htaccess at https://theadventurouswriter.com/quipstipsworkingworld/

    It was making the subdirectory /quipsandtipsworkingworld redirect to the index page of the site https://theadventurouswriter.com/ .

    The .htaccess file is within the /quipsandtipsworkingworld directory, and a HostGator tech commented out the offending code. She advised me to come here, find someone who could review it for me, and see why it was redirecting the site.

    Can anyone help me fix this, so my Working World doesn’t want to redirect to The Adventurous Writer?

    Thanks,
    Laurie

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter lauriepk

    (@lauriepk)

    Is there anyone who can please help me with this problem??

    Thread Starter lauriepk

    (@lauriepk)

    I guess this means that there’s NOBODY here who can help me???

    Well, you haven’t exactly given anyone a great deal to work with. A copy of your current .htaccess file might be a good start…

    Thread Starter lauriepk

    (@lauriepk)

    Thanks for your reply — I appreciate it!

    This is my current .htaccess file:

    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/laurie70/public_html/quipstipsworkingworld/php.ini
    <Files php.ini>
    order allow,deny
    deny from all
    </Files>
    </IfModule>

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /quipstipsworkingworld/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /quipstipsworkingworld/index.php [L]
    </IfModule>

    # END WordPress
    #RewriteEngine On
    #RewriteBase /

    #RewriteCond %{REQUEST_METHOD} !=POST
    #RewriteCond %{QUERY_STRING} !.*=.*
    #RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    #RewriteCond %{HTTP:Accept-Encoding} gzip
    #RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240×320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).*
    #RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    #RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

    #RewriteCond %{REQUEST_METHOD} !=POST
    #RewriteCond %{QUERY_STRING} !.*=.*
    #RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    #RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    #RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240×320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).*
    #RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    #RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]

    You’ve got two blocks for supercache in there (you shoudn’t need both – they appear to be identical) and then right at the bottom:

    #RewriteRule . /index.php [L]

    which will over-write
    RewriteRule . /quipstipsworkingworld/index.php [L]

    near the top. Try commenting that last line out.

    Thread Starter lauriepk

    (@lauriepk)

    Thank you! But how do I do that? How do I comment that last line out?

    I’m sorry — I just don’t know this stuff.

    Thread Starter lauriepk

    (@lauriepk)

    Also, should I delete one of the supercache blocks? Does that mean just deleting this block?

    #RewriteCond %{REQUEST_METHOD} !=POST
    #RewriteCond %{QUERY_STRING} !.*=.*
    #RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    #RewriteCond %{HTTP:Accept-Encoding} gzip
    #RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240×320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).*
    #RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    #RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

    should I delete one of the supercache blocks?

    Yes – I would but I’d also suggest first making a backup copy of your current .htaccess file before you being editing it.

    and just remove the three lines at the bottom:

    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]
    Thread Starter lauriepk

    (@lauriepk)

    Great, thank you! Now it looks like this….

    And – how do I comment the last line out? Or…did I already do that?

    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/laurie70/public_html/quipstipsworkingworld/php.ini
    <Files php.ini>
    order allow,deny
    deny from all
    </Files>
    </IfModule>

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /quipstipsworkingworld/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /quipstipsworkingworld/index.php [L]
    </IfModule>

    # END WordPress
    #RewriteEngine On
    #RewriteBase /

    #RewriteCond %{REQUEST_METHOD} !=POST
    #RewriteCond %{QUERY_STRING} !.*=.*
    #RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    #RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    #RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240×320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).*
    #RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    #RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    Anything that starts with # is already commented out, so you could just try removing all lines that start with #.

    Thread Starter lauriepk

    (@lauriepk)

    Thank you for all your help, Esmi! It’s working perfectly now. ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘rewrite code problem’ is closed to new replies.