Irish SEO,  Marketing & Webmaster Discussion
 

 

Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 16-04-2008, 02:51 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,174
Cormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to behold
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default * wildcard htaccess 301 redirect

I'm trying to setup a redirect so that any request to any page which ends in ?page_id gets redirected to the homepage of the site.
The following rule is placed within the htaccess file but it throws up an internal server error:

Code:
RewriteRule ^?page_id=(.*)$ /http://site.something.com [L,R=301]
Any ideas?
__________________
my blog | Apple Mac Blog | Indie Music Blog | *
Reply With Quote
  #2 (permalink)  
Old 16-04-2008, 03:11 PM
paul's Avatar
Web Whore
 
Join Date: Dec 2006
Location: .de
Posts: 967
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

Code:
RewriteRule ^?page_id=(.*)$ /http://site.something.com [L,R=301]
this doesn't look right, i.e. the forward slash...
__________________
my sites :
irish poker / irish jobs / seo faq / advertise jobs free / green card / skiing
Reply With Quote
  #3 (permalink)  
Old 16-04-2008, 03:17 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

try this
Code:
RewriteRule ^(.*)?\?page_id=(.*)?$ http://site.something.com [L,R=301]
#or this
RewriteRule ^(.*)?([\?])page_id=(.*)$ http://site.something.com [L,R=301]
also you have a "/" in front of the http:// which shouldn't be there
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
  #4 (permalink)  
Old 16-04-2008, 03:21 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

or try this option
Code:
RewriteCond %{QUERY_STRING} ^page_id=(.*) 
RewriteRule /* http://site.something.com [R=301,L] 
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
Reply

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
301 redirect ziycon Coding Help 8 03-04-2008 05:38 PM
New Domain name with 301 redirect Wenlock Search Engine Optimisation 6 18-03-2008 12:34 PM
301 redirect issue lostie Webmaster Discussion 2 17-07-2007 12:33 PM
301 redirect question JamesA Coding Help 11 06-02-2007 08:59 PM
Shorter URLs with 301 redirect blacknight Webmaster Discussion 1 31-08-2006 09:08 PM


All times are GMT +1. The time now is 04:13 AM.


Powered by: vBulletin Version 3.7.2, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.

Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56