Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Mar 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Redirecting Contact Us form in .htaccess

    Ok,

    I never got a redirect but the work around was to add a link to the top navigation to the correct contact form and to disable the links to the unprotected form in "define page status" in the configuration.

  2. #12
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: Redirecting Contact Us form in .htaccess

    Quote Originally Posted by Website Rob View Post
    Add the following to your main .htaccess and test.

    RewriteRule ^index\.php?main_page=contact_us$ http://other_domain.com/contact.html [NC,R=301,L]
    That code cannot possibly work.

    RewriteRule cannot "see" parameters attached to a URL.


    A preceding RewriteCond looking at QUERY_STRING is required.
    Code:
    RewriteCond %{QUERY_STRING} main_page=contact_us
    RewriteRule ^(index\.php)?$  http://www.other_domain.com/contact.html [R=301,NC,L]
    Online since 1995.

  3. #13
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: Redirecting Contact Us form in .htaccess

    Quote Originally Posted by bigwavemaui View Post
    Options +FollowSymlinks
    RewriteEngine on
    Redirect 301 /index.php?main_page=contact_us http://samedomainascart.com/samedomainblog/contact-island/

    I know I must be doing something stupid.
    You turn the mod_rewrite RewriteEngine "on" and then use the Redirect syntax. Redirect is not a part of mod_rewrite. Redirect cannot deal with URL requests that include parameters. RewriteRule with a preceding RewriteCond can do the job.

    Try:

    Code:
    RewriteCond %{QUERY_STRING} main_page=contact_us
    RewriteRule ^(index\.php)?$  http://samedomainascart.com/samedomainblog/contact-island/ [R=301,NC,L]
    Online since 1995.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Contact US page + One more Contact FORM :blink:
    By Orange Wacko in forum Managing Customers and Orders
    Replies: 0
    Last Post: 21 Jul 2009, 10:29 PM
  2. SPAM from ‘Contact Us’ form, even though form is removed
    By Beer_man in forum General Questions
    Replies: 5
    Last Post: 3 Dec 2008, 02:40 AM
  3. Contact Us Page Not Redirecting
    By Divalicious Chocolat in forum General Questions
    Replies: 2
    Last Post: 9 Oct 2008, 08:14 PM
  4. Problem redirecting upon form submission
    By dgsignal in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 26 Jun 2008, 06:16 PM
  5. Need help redirecting old htm pages (.htaccess)
    By oldschoolrocker in forum General Questions
    Replies: 8
    Last Post: 1 Jul 2006, 04:09 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR