Webmastersite.net
Register Log In

Re-Write For search engine
.htaccess not working correctly.

Comments on Re-Write For search engine

robinantill
Member

Usergroup: Customer
Joined: Aug 06, 2004

Total Topics: 10
Total Comments: 15
Posted Mar 04, 2006 - 11:22 AM:

I have set up WSN Links to use mod_rewrite URL rewriting which works fine.

What I am trying to do is to re-direct my old links program pages to the new WSN links program pages.

e.g. My old page is </A>... My new page is <A href=' http://www.gardenbuildings.com/directory/Garden-B</A>...

I added to the .htaccess file the following:-

Redirect 301 /directory/Great-Britain <A href='http://www.gardenbuildings.com/directory/Garden-Buildings/Great-Britain-UK"' target=_blank http://www.gardenbuildings.com/directory/Garden-B[/url]...


When I now click on my old URL it redirects to the new page www.gardenbuildings.com/dir...=Great-Britain<br>
but with the ?action=displaycat&catname=Great-Britain at the end which is no good from a search engine point of view and it looks silly.

I have tried moving the redirect either side of the .htaccess file to see if that may a difference. I have added a '/' to the end of the URL and that made no difference.

The following is the .htaccess file.

AddHandler server-parsed .html
DirectoryIndex index.php

Options +FollowSymlinks

RewriteEngine on
# If not working, uncomment and correctly fill the line below:
RewriteBase /directory/
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/>)$ $1/ [R]
RewriteRule ^admin$ admin/index.php
RewriteRule ^admin/$ admin/index.php
RewriteRule ^links/([a-z]+)/([0-9]+)/?$ link.php?action=$1&id=$2
RewriteRule ^links/([0-9]+)/?$ link.php?id=$1
RewriteRule ^thread/([0-9]+)/?$ thread/$1
RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ thread/$1/$2
RewriteRule ^([0-9]+)/?$ index.php?action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?action=displaycat&catid=$1/$2
RewriteRule ^([-_/+A-Za-z0-9]+)$ index.php?action=displaycat&catname=$1
RewriteRule ^links/([-_/+A-Za-z0-9]+)-([0-9]+).html$ link.php?action=detail&id=$2
RewriteRule ^/([-_/+A-Za-z0-9]+)-([0-9]+).html$ link.php?action=detail&id=$2

Redirect 301 /directory/More-Links/Great-Britain <A href="http://www.gardenbuildings.com/directory/Misc-Resources/Great-Britain-UK" target=_blank www.gardenbuildings.com/dir...Misc-Res...]</A]...
Redirect 301 /directory/Great-Britain <A href="http://www.gardenbuildings.com/directory/Garden-Buildings/Great-Britain-UK" target=_blank <A href="http://www.gardenbuildings.com/directory/Garden-B <A href="http://www.gardenbuildings.com/directory/Garden-B]http://www.gardenbuildings.com/directory/Garden-B[/url]...

Can you suggest where the problem is ?

Thanks in advance.

mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Mar 09, 2006 - 1:02 PM:

I think your post got garbled, try using the quote or code wsncodes next time.

This is what I use for redirects

RewriteRule ^oldfolder/oldfile.htm$ http://www.samplesite.com/newfolder/newfile.htm[/code]





 
robinantill
Member

Usergroup: Customer
Joined: Aug 06, 2004

Total Topics: 10
Total Comments: 15
Posted Mar 13, 2006 - 3:53 PM:

Hi,

Thank you for your reply, but this did not work for me.

Robin
mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
Posted Dec 12, 2006 - 12:20 PM:

I also am trying to redirect with the same result. I am redirecting mysite.com/whatever.html to mysite.com/newversion/whatever.html. the "?action=displaycat&catname=" is added to the url. Is there a fix??

Thanks
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 12, 2006 - 4:27 PM:

This is an ancient thread. Use the SEO page on the admin panel, instructions are written on the page.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.