Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Default .htaccess file won't redirect

    Hi, Was wondering if someone could help me here. I followed all instructions to redirect deleted URL's to a different address in the .htaccess file Doesn't work. Tech support won't help me. Here is the code below in the file. Any help would be greatly appreciated.

    redirect 301 (the instruction that the page has moved)

    RedirectPermanent /yorkcountydining.com/restaurant_talk/index.html (the original folder path and file name)

    http://www.masondixonantiquetrail.co...-restaurants/? (new path and file name)

    Options +FollowSymLinks

    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
    RewriteRule ^restaurant_talk/index.php?act=calendar$ http://www.masondixonantiquetrail.co...php?/calendar/ [R=301]

    RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
    RewriteRule ^restaurant_talk/index.php?autocom=chatpara$ http://www.yorkcountydining.com/chat_room.html [R=301]

    RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
    RewriteRule ^restaurant_talk/index.php?automodule=blog$ http://www.masondixonantiquetrail.co...ex.php?/blogs/ [R=301]

    RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
    RewriteRule ^restaurant_talk/index.php?act=module&module=gallery$ http://www.masondixonantiquetrail.co...hp?app=gallery [R=301]

    RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
    RewriteRule ^announcements/list.php?page=1&order=ascannouncements/list.php?page=1&order=asc$ http://www.masondixonantiquetrail.co...announcements/ [R=301]

    RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
    RewriteRule ^restaurant_talk/index.php?s=81edf416cdf483741cc74cb918f48&act=Logi n&CODE=00$ http://www.masondixonantiquetrail.co...&section=login [R=301]

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Would need a bit more information on the structure of your sites. Are both these domains located on the same server? If so which is the main domain and which is the secondary domain. Where is the secondary domains located? In other words when you set it up in Site Manager what directory did you point it to?

    All this is very wrong if it is indeed in your .htaccess file and formatted like this:
    Code:
    redirect 301 (the instruction that the page has moved)
    
    RedirectPermanent /yorkcountydining.com/restaurant_talk/index.html (the original folder path and file name)
    
    http://www.masondixonantiquetrail.co...-restaurants/? (new path and file name)
    When you post code like this in the forum you should use the code bbcode tags to surround it so formatting is not lost. That is the icon represented by #.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    BTW: You index.(?) file that is located in yorkcountydining.com/restaurant_talk is all wrong. You would be better off simply putting up the link in the main body of the page:
    HTML Code:
    <html>
    	<head>
    		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
    		<meta name="generator" content="Adobe GoLive 4">
    	</head>
    
    	<body>
    Sorry this site has moved to here: <a href="http://masondixonantiquetrail.com/mason-dixon/index.php?/forum/12-mdat-restaurants/">http://masondixonantiquetrail.com/mason-dixon/index.php?/forum/12-mdat-restaurants/</a>
    	</body>
    
    </html>
    Last edited by wildjokerdesign; 03-27-2010 at 06:52 AM.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Default

    Both domains are located on the same server. http://www.yorkcountydining.com and http://www.masondixonantiquetrail.com is a virtual domain.
    The main domain is cedarrock.net I deleted what was there in the .htaccess file and put this simple code below in the .htaccess file which resides in yorkcountydining.com Tech support doesn't know why it doesn't work. So, I'm not sure what to do. I've put the code in exactly as recommended by everything I read on the net. Any help would be greatly appreciated.
    It won't redirect http://www.yorkcountydining.com/rest...alk/index.html to the mason dixon URL below.

    Code:
    RewriteEngine on
    RewriteRule ^/restaurant_talk/index.html$ http://masondixonantiquetrail.com/mason-dixon/index.php?/forum/12-mdat-restaurants/?
    Quote Originally Posted by wildjokerdesign View Post
    Would need a bit more information on the structure of your sites. Are both these domains located on the same server? If so which is the main domain and which is the secondary domain. Where is the secondary domains located? In other words when you set it up in Site Manager what directory did you point it to?

    All this is very wrong if it is indeed in your .htaccess file and formatted like this:
    Code:
    redirect 301 (the instruction that the page has moved)
    
    RedirectPermanent /yorkcountydining.com/restaurant_talk/index.html (the original folder path and file name)
    
    http://www.masondixonantiquetrail.co...-restaurants/? (new path and file name)
    When you post code like this in the forum you should use the code bbcode tags to surround it so formatting is not lost. That is the icon represented by #.

  5. #5
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Give this a try:
    Code:
    RewriteEngine on
    RewriteRule ^/restaurant_talk/index.html$ http://masondixonantiquetrail.com/mason-dixon/index.php?/forum/12-mdat-restaurants/ [L,R=301]
    Notice I removed the ? on the end and then added [L,R=301]. You should be able to copy and past. Also you need to create this in a plain text editor and upload it in ASCII/Text mode. You might end up needing to change the index.html part of the code to (.*) if you want to catch all stuff that used to be in that directory.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

Posting Permissions

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