Solved

apache rewrite rule

Posted on 2004-08-09
20
491 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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