Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 06-05-08
Frostie's Avatar
Moderator
 
Join Date: Aug 2003
Location: Wirral
Posts: 2,903
Thanks: 2
Thanked 2 Times in 1 Post
Frostie is on a distinguished roadFrostie is on a distinguished road
  Rewrite in .htaccess

I can usually sort out any rewrites but I am struggling on this one, following the redesign of my pages and wondered how best to go about it would be;

All my pages have changed format so have changed from the following format;
Code:
http://www.mydomain.co.uk/company_nasty_term_company312.html
to....
Code:
http://www.mydomain.co.uk/company_seo_term_company312.html
So the stuff before and after "nasty_term" stays the same, just "nasty_term" has changed to "seo_term". I presume there are a few *'s a few ^'s and a few $1 or $2 to be added in the rule, but I am scuppered if I can get it to work.

Can anyone shed any light? The best I could come up with (but doesnt work) is;
Code:
RewriteRule ^.*_nasty_term_*.html http://www.mydomain.co.uk/$1_seo_term_$2.html
I need to change it to help with the Search Engines that have the old "nasty_term" in their indexes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-05-08
Registered User
 
Join Date: Jul 2005
Location: Northamptonshire
Posts: 571
Thanks: 0
Thanked 2 Times in 2 Posts
futureweb is an unknown quantity at this point
  Re: Rewrite in .htaccess

Code:
RewriteRule ^(.*)_nasty_term_(*.)html$ http://www.mydomain.co.uk/$1_seo_term_$2.html [L]
Should sort you out m8ty
__________________
Mobile Phones
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-05-08
Frostie's Avatar
Moderator
 
Join Date: Aug 2003
Location: Wirral
Posts: 2,903
Thanks: 2
Thanked 2 Times in 1 Post
Frostie is on a distinguished roadFrostie is on a distinguished road
  Re: Rewrite in .htaccess

Causes 500 internal errors.

Thanks anyway for suggestion.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-05-08
Registered User
 
Join Date: Jul 2005
Location: Northamptonshire
Posts: 571
Thanks: 0
Thanked 2 Times in 2 Posts
futureweb is an unknown quantity at this point
  Re: Rewrite in .htaccess

Hi M8,

You are getting the error 500 because the values of $1 & $2 are not getting passed.

How are you picking up the values of $1 & $2 ? and what did your old *nasty_term htaccess rule look like?

you must have a dynamic page that picks the vars up?
__________________
Mobile Phones
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-05-08
Frostie's Avatar
Moderator
 
Join Date: Aug 2003
Location: Wirral
Posts: 2,903
Thanks: 2
Thanked 2 Times in 1 Post
Frostie is on a distinguished roadFrostie is on a distinguished road
  Re: Rewrite in .htaccess

Yeah I have a rewrite rule that gets dynamic pages and chucks them as static html's.

The old HTMLs have been indexed so I am just trying to change these. The rewrite from dynamic to static is working fine under the new seo_term

Confusing myself now
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-05-08
Registered User
 
Join Date: Jul 2005
Location: Northamptonshire
Posts: 571
Thanks: 0
Thanked 2 Times in 2 Posts
futureweb is an unknown quantity at this point
  Re: Rewrite in .htaccess

Gottcha you want to redirect then not re-write to tell the search engines you moved it?

Code:
 redirect 301 (.*)_nasty_term_(*.)html http://www.mydomain.co.uk/$1_seo_term_$2.html
__________________
Mobile Phones
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-05-08
Registered User
 
Join Date: Jul 2005
Location: Northamptonshire
Posts: 571
Thanks: 0
Thanked 2 Times in 2 Posts
futureweb is an unknown quantity at this point
  Re: Rewrite in .htaccess

You want a $ on the end of the nasty.html$ soz
__________________
Mobile Phones
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-05-08
Frostie's Avatar
Moderator
 
Join Date: Aug 2003
Location: Wirral
Posts: 2,903
Thanks: 2
Thanked 2 Times in 1 Post
Frostie is on a distinguished roadFrostie is on a distinguished road
  Re: Rewrite in .htaccess

Still no joy

I will PM you the htaccess file because its probably the way I am explaining it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please can you help with .htaccess Ditzy Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 3 22-01-07 06:35 PM
.htaccess confusion Ditzy Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 5 08-10-06 03:41 PM
.htaccess "special characters" Wardy Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 2 17-01-06 05:36 PM
mod rewrite in root only tezar Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 17 18-08-05 04:33 PM
.htaccess, does it really work at all? ninsboak Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 4 13-05-03 09:54 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7