Buy Sell Discuss UK Domain Names at AcornDomains.co.uk Domain Monster Domain Name Registration

Today's Drop Dates are: 19-02-2012 or 26-02-2012   All times are GMT. The time now is 12:48:25 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design > Scripts and Coding
Connect with Facebook

Scripts and Coding PHP, MySQL, scripts

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 05-01-2012, 09:31:18 AM     #1 (permalink)

 
mally's Avatar
 
Join Date: Mar 2006
Location: Durham
Posts: 1,825
mally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond repute

redirect question

Hello

I've transfered my forum from IPB to Vbulletin, and I'm trying to set up my htaccess file however I can't get it to 301 to my new urls.

I've got a list of old and new, just need to work out what to put in the .htaccess

Can anyone advise? (the links below are correct just doesn't work lol)

Example
Quote:
RewriteEngine On
RewriteBase /
Redirect 301 /index.php?showtopic=2 http://www.fibro.org.uk/threads/1-Welcome
Redirect 301 /index.php?showtopic=3 http://www.fibro.org.uk/threads/2-Welcome-to-the-forum
Redirect 301 /index.php?showtopic=4 http://www.fibro.org.uk/threads/3-Spoons
Redirect 301 /index.php?showtopic=5 http://www.fibro.org.uk/threads/4-Hello-from-Bubbly
mally is offline  
Old 05-01-2012, 09:52:25 AM     #2 (permalink)
dta

 
Join Date: Jul 2009
Posts: 388
dta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud of

Never done it that way - don't think that could ever work when using parameters (happy to be proven wrong).

Here's what I do when dealing with parameters (anything after the ?) - use modrewrites and then the type of redirect after in [ ] i.e.

RewriteRule ^what to redirect$ http://where to go? [L,R=301]
dta is offline  
Old 05-01-2012, 10:22:16 AM     #3 (permalink)

 
mally's Avatar
 
Join Date: Mar 2006
Location: Durham
Posts: 1,825
mally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond repute

Thanks for your help and reply, could you give me an example of the line using my code above please/
mally is offline  
Old 05-01-2012, 10:28:05 AM     #4 (permalink)
dta

 
Join Date: Jul 2009
Posts: 388
dta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud of

try this:

RewriteEngine On
RewriteRule ^index.php?showtopic=2$ http://www.fibro.org.uk/threads/1-Welcome [L,R=301]

or if that doesn't pass through the params try with this:
RewriteRule ^index.php?showtopic=2$ http://www.fibro.org.uk/threads/1-Welcome [QSA,R=301]
dta is offline  
Old 05-01-2012, 10:35:02 AM     #5 (permalink)

 
mally's Avatar
 
Join Date: Mar 2006
Location: Durham
Posts: 1,825
mally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond repute

Thanks again for your help. I tried both versions but still nothing is working (
mally is offline  
Old 05-01-2012, 11:09:39 AM     #6 (permalink)
dta

 
Join Date: Jul 2009
Posts: 388
dta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud of

what happens when you tried the above?

another way is to do this:
RewriteCond %{REQUEST_URI} /index.php$
RewriteCond %{QUERY_STRING} ^showtopic=2$
RewriteRule ^.*$ http://www.fibro.org.uk/threads/1-Welcome [L,R=301]

if that still fails you've nearly reached the end of my htaccess knowledge
dta is offline  
Old 05-01-2012, 12:16:18 PM     #7 (permalink)

 
mally's Avatar
 
Join Date: Mar 2006
Location: Durham
Posts: 1,825
mally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond reputemally has a reputation beyond repute

Quote:
Originally Posted by dta View Post
what happens when you tried the above?

another way is to do this:
RewriteCond %{REQUEST_URI} /index.php$
RewriteCond %{QUERY_STRING} ^showtopic=2$
RewriteRule ^.*$ http://www.fibro.org.uk/threads/1-Welcome [L,R=301]

if that still fails you've nearly reached the end of my htaccess knowledge
this appears to have worked thanks very much!
mally is offline  
Old 05-01-2012, 01:11:12 PM     #8 (permalink)
dta

 
Join Date: Jul 2009
Posts: 388
dta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud of

no worries - glad i could help you sort it out
dta is offline  
Closed Thread



Bookmarks

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
Quick htaccess redirect question Rob_F Scripts and Coding 7 12-11-2011 04:21:36 PM
.htaccess duplicate content redirect problem matty281k Website Design 1 14-02-2011 11:48:37 AM
htaccess redirect question... mat Website Design 5 01-07-2010 09:46:57 AM
Redirect old Google Results and incoming links jonathanza Website Design 3 22-12-2009 09:02:12 AM
(SEO) 301 Redirect seanc Website Design 2 16-03-2006 06:29:04 PM


All times are GMT. The time now is 12:48:25 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".