xampp permanent re-direct

This is a discussion on xampp permanent re-direct within the Apache Web Server forums, part of the Web Server and Related Forums category; I am trying to do some local testing of re-directs. I need to be able to take site1/page1....


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-09-2008
Terry
 
Posts: n/a
Default xampp permanent re-direct

I am trying to do some local testing of re-directs. I need to be able
to take site1/page1.html and re-direct it to site2/pageX.php I wrote
one for page1.html to page1.php but so far I am having no luck with
changing directories.

A point in the right direction would be greatly appreciated.

--
TK
http://www.wejuggle2.com/
Still Having a Ball


----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
  #2 (permalink)  
Old 03-11-2008
Trammel
 
Posts: n/a
Default Re: xampp permanent re-direct

"Terry" <tknoat@wejuggle.com> wrote in message news:1205073366_480@isp.n...
> I am trying to do some local testing of re-directs. I need to be able
> to take site1/page1.html and re-direct it to site2/pageX.php I wrote
> one for page1.html to page1.php but so far I am having no luck with
> changing directories.
>
> A point in the right direction would be greatly appreciated.


Try this & let us know if it worked?:

RewriteEngine on
RewriteLog "rewrite.log"
RewriteLogLevel 1
RewriteCond %{REQUEST_URI} ^mysite.com/page1.html$ [NC]
RewriteRule ^mysite.com/page1.html$ http://www.theirsite.com/pagex.php
[NC,R,L]

^ = Start of string
$ = End of string
NC = NoCase (Not case sensitive)
R = Redirect (external-like)
L = Last rule (Dont process more for this condition)


  #3 (permalink)  
Old 03-11-2008
Jim Hayter
 
Posts: n/a
Default Re: xampp permanent re-direct

Trammel wrote:
> "Terry" <tknoat@wejuggle.com> wrote in message news:1205073366_480@isp.n...
>> I am trying to do some local testing of re-directs. I need to be able
>> to take site1/page1.html and re-direct it to site2/pageX.php I wrote
>> one for page1.html to page1.php but so far I am having no luck with
>> changing directories.
>>
>> A point in the right direction would be greatly appreciated.

>
> Try this & let us know if it worked?:
>
> RewriteEngine on
> RewriteLog "rewrite.log"
> RewriteLogLevel 1
> RewriteCond %{REQUEST_URI} ^mysite.com/page1.html$ [NC]
> RewriteRule ^mysite.com/page1.html$ http://www.theirsite.com/pagex.php

^^^^^^^^^^
I don't think that should be there. You can't test the host name in a
RewriteRule that way.

> [NC,R,L]
>
> ^ = Start of string
> $ = End of string
> NC = NoCase (Not case sensitive)
> R = Redirect (external-like)
> L = Last rule (Dont process more for this condition)
>
>

  #4 (permalink)  
Old 03-11-2008
Trammel
 
Posts: n/a
Default Re: xampp permanent re-direct

"Jim Hayter" <see.reply.to@nowhere.invalid> wrote in message
news:13tddekqbbnic99@news.supernews.com...
> Trammel wrote:
> > "Terry" <tknoat@wejuggle.com> wrote in message

news:1205073366_480@isp.n...
> >> I am trying to do some local testing of re-directs. I need to be able
> >> to take site1/page1.html and re-direct it to site2/pageX.php I wrote
> >> one for page1.html to page1.php but so far I am having no luck with
> >> changing directories.
> >>
> >> A point in the right direction would be greatly appreciated.

> >
> > Try this & let us know if it worked?:
> >
> > RewriteEngine on
> > RewriteLog "rewrite.log"
> > RewriteLogLevel 1
> > RewriteCond %{REQUEST_URI} ^mysite.com/page1.html$ [NC]
> > RewriteRule ^mysite.com/page1.html$

http://www.theirsite.com/pagex.php
> ^^^^^^^^^^
> I don't think that should be there. You can't test the host name in a
> RewriteRule that way.
>
> > [NC,R,L]
> >
> > ^ = Start of string
> > $ = End of string
> > NC = NoCase (Not case sensitive)
> > R = Redirect (external-like)
> > L = Last rule (Dont process more for this condition)


Ok... so test in the vhosts file (without the original site being stated):

RewriteEngine on
RewriteLog "rewrite.log"
RewriteLogLevel 1
RewriteCond %{REQUEST_URI} ^/page1.html$ [NC]
RewriteRule ^/page1.html$ http://www.theirsite.com/pagex.php [NC,R,L]


 


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

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



All times are GMT +1. The time now is 03:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0