Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

How to redirect

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Slow Initial Connection  
Author Message
ecol1111

External


Since: Jun 04, 2004
Posts: 3



(Msg. 1) Posted: Fri Jun 04, 2004 10:23 am
Post subject: How to redirect
Archived from groups: alt>apache>configuration (more info?)

I'm transferring my site from static pages which are all called
www.mysite.com/[productcode].html, to a PHP solution that will have one standard
product page (product.php) and will take the product code to display
as a parameter eg www.mysite.com\product.php?id=12345

I'd like to make sure that all search engine links and other links
that currently go straight to an HTML product page will still be able
to find the correct page, so I thought I'd see if it can be done with
a .htaccess redirect.

eg

redirect *.html *.php?id=????? (syntax obviously not perfect!)

I'm hopeless at the expression parsing bit of htaccess and wondered if
anyone has done a similar thing before. I will need to be able to
exclude certain files (eg index.html) from the redirects, although I
could even get round this if it's not possible.

 >> Stay informed about: How to redirect 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Fri Jun 04, 2004 5:26 pm
Post subject: Re: How to redirect [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Andy Rigby <ecol1111 RemoveThis @yahoo.co.uk> wrote:
 > to find the correct page, so I thought I'd see if it can be done with
 > a .htaccess redirect.

I think you'll need some rewrite rule in order to do so.
See the documentation for mod_rewrite.

Davide

--
| Well, if you can't believe what you read in a comic book, what can
| you believe?!
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: How to redirect 
Back to top
Login to vote
ecol1111

External


Since: Jun 04, 2004
Posts: 3



(Msg. 3) Posted: Mon Jun 07, 2004 4:53 am
Post subject: Re: How to redirect [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It's the HTACCESS file I really need to find out about. I'm familiar
with editing it, as I've used it before, but I find it really hard to
get my head around the expression parsing syntax when it comes to only
redirecting certain page requests.

Andy

ecol1111.TakeThisOut@yahoo.co.uk (Andy Rigby) wrote in message news:<d7d8dd25.0406040623.7a2e1bf7.TakeThisOut@posting.google.com>...
 > I'm transferring my site from static pages which are all called
 > <a style='text-decoration: underline;' href="http://www.mysite.com/[productcode].html," target="_blank">www.mysite.com/[productcode].html,</a> to a PHP solution that will have one standard
 > product page (product.php) and will take the product code to display
 > as a parameter eg <a style='text-decoration: underline;' href="http://www.mysite.com" target="_blank">www.mysite.com</a>\product.php?id=12345
 >
 > I'd like to make sure that all search engine links and other links
 > that currently go straight to an HTML product page will still be able
 > to find the correct page, so I thought I'd see if it can be done with
 > a .htaccess redirect.
 >
 > eg
 >
 > redirect *.html *.php?id=????? (syntax obviously not perfect!)
 >
 > I'm hopeless at the expression parsing bit of htaccess and wondered if
 > anyone has done a similar thing before. I will need to be able to
 > exclude certain files (eg index.html) from the redirects, although I
 > could even get round this if it's not possible.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How to redirect 
Back to top
Login to vote
ecol1111

External


Since: Jun 04, 2004
Posts: 3



(Msg. 4) Posted: Tue Jun 08, 2004 9:30 am
Post subject: Re: How to redirect [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ecol1111.DeleteThis@yahoo.co.uk (Andy Rigby) wrote in message news:<d7d8dd25.0406070053.432aae78.DeleteThis@posting.google.com>...
 > It's the HTACCESS file I really need to find out about. I'm familiar
 > with editing it, as I've used it before, but I find it really hard to
 > get my head around the expression parsing syntax when it comes to only
 > redirecting certain page requests.
 >
 > Andy
 >
Oh sorry, now I see what you mean....use RewriteRule in my htaccess
file.

OK so I've tried that and got a bit further. I can now redirect to the
'master' page and supply a parameter to it.

The last thing I've got to figure out is how to NOT do the redirect
for certain pages (eg index.html)

Andy<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How to redirect 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
URL Redirect - Thanks in advance for reading. I have a question about redirecting URLs on an Apache system. (I am running 1.3.26.) I have multiple URLs that are resolving to one IP address. I would like to have Apache redirect all of these URLs to another URL that....

redirect.pl - help - Greetings, I have apache 1.3 installed on FreeBSD 4.7. I'm trying to find a redirect.pl for my cgi-bin (need it for a web page). where is this located ? Or, where can I get it ? thanks, -D

redirect - Hi , I have apache in my win2000 for server web with +/- 60 sites. I must set config for this : All people that connect to my fixed ip to external must redirect to dir : /public/ Only the local pc can navigate inside all server dir ??? Thks

url redirect in Apache - Hi there I have a problem when trying to redirect an URL. So please help me if you can, because I am going crazy on this.... The platform is an IBM Apache HTTP Server V. 1.3 and an IBM Application Server V. 4.x running a Devine solution. Now my..

redirect to a specific url? - hi guys... nice forum going on here :) ok.. I've searched every topic about this almost close to what I need but I can't find the solution.. what I want to do is redirect an url to another one.. for example: http://tinyurl.com/3ypvt to ..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]