Solved

apache rewrite rule

Posted on 2004-08-09
20
489 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
 

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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now