PDA

View Full Version : .htaccess file won't redirect



cedarvalley
03-26-2010, 10:54 PM
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.com/mason-dixon/index.php?/forum/12-mdat-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.com/mason-dixon/index.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.com/mason-dixon/index.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.com/mason-dixon/index.php?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.com/mason-dixon/index.php?/forum/24-announcements/ [R=301]

RewriteCond %{HTTP_HOST} ^yorkcountydining.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yorkcountydining$
RewriteRule ^restaurant_talk/index.php?s=81edf416cdf483741cc74cb918f48&act=Login&CODE=00$ http://www.masondixonantiquetrail.com/mason-dixon/index.php?app=core&module=global&section=login [R=301]

wildjokerdesign
03-27-2010, 06:26 AM
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:

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 #.

wildjokerdesign
03-27-2010, 06:48 AM
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>
<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>

cedarvalley
03-27-2010, 10:21 AM
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/restaurant-talk/index.html to the mason dixon URL below.


RewriteEngine on
RewriteRule ^/restaurant_talk/index.html$ http://masondixonantiquetrail.com/mason-dixon/index.php?/forum/12-mdat-restaurants/?


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:

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 #.

wildjokerdesign
03-27-2010, 04:15 PM
Give this a try:

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.