Welcome, guest! Login Join
Close

Login to Your Account


  |  » Forgot your password?

Notices

yet another question from the dummy of ABW :)

 
Tools Search
  #1  
Old
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,781
Send a message via AIM to Gordon
yet another question from the dummy of ABW :)

I am trying to get mod rewrite to work I have got it working all but for one thing.

If the URL (usually a product name) contains a "#" symbol like in "#9" the url will not work, (it works in the original .php script using the php formating) it works for everything apart from the "#" symbol is there any way to get this to work please?

Somebody told me about a rewrite log but as usual I have no idea what they are talking about
style="margin:20px; margin-top:5px; ">
Quote:
the rewriteLog says
args=ip=Scientific+Angler+Fishing+Fly+Rod+Salt+water+-+9+2+Piece+#10+Weight

but its lost somewhere... everything followed by a % is lost...
I've done a work around by changing the "#" to "no" but I would prefer the "#" if it is at all possible.

This is the rule I am using for it at present.

RewriteRule ^([^/_]+)\.htm /?ip=$1 [L]

thanks in advance for any help.
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
  #2  
Old
Resident Genius and Staunch Capitalist
Join Date: January 18th, 2005
Location: Florida
Posts: 12,817
N/m, I was going to say just make it say "no" instead but I see you're already doing that...
__________________
There is no knowledge that is not power. ~Hemingway
  #3  
Old
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,781
Send a message via AIM to Gordon
Leader I might look daft but I'm not 100% daft LOL
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
Join ABW to remove this sponsored message.
  #4  
Old
Sgt. Joe Friday
Join Date: January 18th, 2005
Posts: 441
Just leave out the #. Any flyfisher (and most other anglers) will know what the weight relates to.

Frank
  #5  
Old
Animal Lover
Join Date: January 18th, 2005
Location: oz
Posts: 1,210
Gordon

I'm not sure if this is right or not (I'm no mod rewrite expert)

You could always modify it in the url and then do a str_replace at the output end with another php script...so eg change it in the link to read

Scientific+Angler+Fishing+Fly+Rod+Salt+wat er+-+9+2+Piece+num10+Weight

and then on the page that receives the info, have a php script that says :

<?php

$ip=str_replace('num','#',$ip);

?>

Then it should read

Scientific+Angler+Fishing+Fly+Rod+Salt+wat er+-+9+2+Piece+#10+Weight

at the receiving end when you do call it.

Don't know if that's what you are after...my 2 cents. Someone with more mod rewrite experience could probably work a solution out for you

Oscar
  #6  
Old
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,781
Send a message via AIM to Gordon
Thanks Oscar that is what I had done but I'm thinking in the future if I come across anther one then I'm screwed because as far as I know we can only use the str_replace for one change. If I'm wrong about this please let me know how to do it.

I was just hoping someone would know how to get around it with the mod rewrite then I would not have to go through all the sites I am going to use it on.
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
Join ABW to remove this sponsored message.
  #7  
Old
Not Verif-Lidated
Join Date: January 18th, 2005
Location: Sunny Florida
Posts: 1,021
(never mind, totally misread the problem)
__________________
Tim
consultant by day, affiliate by night
  #8  
Old
Animal Lover
Join Date: January 18th, 2005
Location: oz
Posts: 1,210
Is this exactly what the rewrite log says?

Scientific+Angler+Fishing+Fly+Rod+Salt+wat er+-+9+2+Piece+#10+Weight

Why is there a blank in 'wat er'? That would translate to wat%20er and whenever I do rewrites I always take out spaces...

If it is the # that's causing the problem it could be that # in most urls read as 'bookmarks'? I don't know if it will work but maybe 'escape' the character with \#. I don't know if it will work - I've never used the exclude ^ before in my mod rewrites and I usually specify what I want in the string rather than what I don't want ie [A-Za-z0-9_\+\#]+

^([\#^/_]+)\.htm /?ip=$1 [L]

I hope it works for you but like I said, I'm not a mod expert...
Oscar
  #9  
Old
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,781
Send a message via AIM to Gordon
Thanks anyway Oscar I cannot get it to work, maybe I'll have to stick with the way I am doing it now. I'ts not the best way but it works until I come across another symbol then I'm screwed LOL
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
Join ABW to remove this sponsored message.
  #10  
Old
Not Verif-Lidated
Join Date: January 18th, 2005
Location: Sunny Florida
Posts: 1,021
str_replace will take arrays, so you can do $ip = str_replace(array('foo','bar'), array('foof', 'barf'), $ip); etc. as needed if you find another symbol that's causing problems.
__________________
Tim
consultant by day, affiliate by night
  #11  
Old
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,781
Send a message via AIM to Gordon
Thanks infospongellc I do mine like this
<?php print stripslashes(str_replace("xxxxxx","xxxxxx",$row["producturl"])); ?>

If I were to do this would it work do you know? or am I not doing it the way you mean?
<?php print stripslashes(str_replace(array('foo','bar'), array('foof', 'barf'),$row["producturl"])); ?>

oops I left my ID in LOL
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
  #12  
Old
Not Verif-Lidated
Join Date: January 18th, 2005
Location: Sunny Florida
Posts: 1,021
I think that's what you're after. It would change foo -> foof and bar -> barf in the product url string.

- Tim
__________________
Tim
consultant by day, affiliate by night
Join ABW to remove this sponsored message.
  #13  
Old
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,781
Send a message via AIM to Gordon
That is a great bit of code infospogellc, I did not know you could use something like that to create more than one alteration. Thank you. That solves all my problems now if another wierd symbol comes up in the future.
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
Reply
 

Tools Search
Search:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about advertising on ABW Prophet Midnight Cafe' 3 June 22nd, 2004 12:25 PM
ABW Best Post Award Kellie aka Ms. B Midnight Cafe' 91 September 15th, 2003 08:28 PM
Todd please help . "Ask a Question" is not working (Data Feed related question) login Commission Junction - CJ 3 April 29th, 2003 06:31 AM
ABW Question dillcard Introduce Yourself 1 June 6th, 2002 12:30 PM
ABW affiliate program question SSanf Midnight Cafe' 2 March 26th, 2002 06:05 PM

X

Welcome to ABestWeb.com

Create your username to jump into the discussion!

ABestWeb.com is the largest affiliate marketing community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?



Content Relevant URLs by vBSEO ©2011, Crawlability, Inc.