Solved

apache rewrite rule

Posted on 2004-08-09
20
492 Views
Last Modified: 2011-09-20
Probably a simple apache rewrite rule.

Webmaster place links to my site using the following link;

https://secure.ibill.com/cgi-win/ccard/rscookie.exe?RevShareID=ispyxxxxxx&returnto=http://www.mydomain.com

I don’t want them to click on this link because it isn’t a direct link to my site and therefore won’t help my Page Rank in Google.

I want them to link directly using to something like;

http://www.mydomain.com/ispyxxxxxx/

ispyxxxxxx being unique for each webmasters link.

What would my rewrite rule be to have user click on http://www.mydomain.com/ispyxxxxxx/

Then redirect them to https://secure.ibill.com/cgi-win/ccard/rscookie.exe?RevShareID=ispyxxxxxx&returnto=http://www.mydomain.com

Using the ispyxxxxxx from the original link.

Thanks in advance for any help.
0
Comment
Question by:Nathan_London
  • 8
  • 8
20 Comments
 
LVL 9

Expert Comment

by:ronan_40060
ID: 11763283
Nathan
pls go through the documenation at
http://www.engelschall.com/pw/apache/rewriteguide/
I will post a reply later on
regards
ronan
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11763403
0
 

Author Comment

by:Nathan_London
ID: 11763781
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:Nathan_London
ID: 11763830
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11764420
0
 

Author Comment

by:Nathan_London
ID: 11764947
This doesnt work.

http://www.mydomain.com/ispy123456/ etc.

Result 404 page not found.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11770230
> Result 404 page not found.
which server does return this?
0
 

Author Comment

by:Nathan_London
ID: 11770389
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11770479
please add [R] to the rule and try again
0
 

Author Comment

by:Nathan_London
ID: 11770909
nope same error. The domain name contains ispy also if that makes a differance.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11771050
pleas enable logging/debugging in mod_rewrite and post logged messages
also post relevant messages from error_log
0
 

Author Comment

by:Nathan_London
ID: 11773448
404 in apache log

Tries to apply /ispy3214234/ to all rewites then pass through;

IP - - [11/Aug/2004:14:27:58 +0000] [www.ispy247.com/sid#80bd0c4][rid#9d9cfec/initial] (3) applying pattern '.^/ispy(.*)/$' to uri '/ispy3214234/'
IP - - [11/Aug/2004:14:27:58 +0000] [www.ispy247.com/sid#80bd0c4][rid#9d9cfec/initial] (1) pass through /ispy3214234/
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11777243
these request do not match what you have asked for.
0
 

Author Comment

by:Nathan_London
ID: 11777811
What do you mean? This is what i want.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11777892
your logfile shows request which never apply to the given rule, which is setup according your given example
0
 

Author Comment

by:Nathan_London
ID: 11778247
the request was http://www.mydomain.com/ispy3214234/

How is that wrong?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 11779089
damn, didn't read carefully, sorry.

Please replace following part
   RewriteRule .^/ispy(.*)/$
by
   RewriteRule ^/ispy(.*)/$
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
follow the php mysql tuto and tells me what's wrong! 10 39
Server specifications for web hosting 7 93
Domino Website - Redirection 12 84
web server dns redirect 5 41
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question