<a href="http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html" target="_blank">http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html</a><br /><a href="http://www.engelschall.com/pw/apache/rewriteguide/" target="_blank">http://www.engelschall.com/pw/apache/rewriteguide/</a><br />After reading through these...I still can't get this darn simple mod rewrite rule to work. Can anyone help. <br />Trying to have this... ex. <b>www.****/123</b> redirect to <b>www.****/in.php?link=123</b><br /><br />This is what I have, Am I even close?<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->RewriteEngine on<br />RewriteRule  ^/(.*) /in.php?link=$1  [R]<!--c2--></div><!--ec2--><br /><br />Thanks for your time,<br />Dave<!--content-->
UPDATE:<br /><br />I got it working with the following...<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->RewriteEngine on<br />RewriteRule ^([0-9]+) /in.php?link=$1<!--c2--></div><!--ec2--><br /><br />but every time I change the regular expression it goes all down the crapper...don't know why. <br /><br />I tried these and none work...only the [0-9]<br />(.+)<br />(.*)<br />([A-Za-z0-9]+)<br />([a-z0-9]+)<br /><br />HELP??? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/ph34r.gif" style="vertical-align:middle" emoid="h34r:" border="0" alt="ph34r.gif" /><!--content-->
Just a thought....<br /><br />You need to make sure that your redirect isn't recursive (i.e. that in.php won't trigger it). Otherwise I am thinking it could get messy very fast.<br /><br />...dave<!--content-->
Well..yeah that wouldn't be good...but the problem still remains. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
interesting... <br />I hadn't tried just using [A-Z] rather than [a-z]...<br />You would never guess what happened. <br /><br />I get this error on my apache log file. <br />RewriteRule: cannot compile regular expression '^([a-z]+)'<br /><br />Yet it goes perfectly through ^([A-Z]+)<br /><br />why the hell is it having problems with a lowercase list. Any ideas...<!--content-->
UPDATE:<br /><br />I got it working with the following...<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->RewriteEngine on<br />RewriteRule ^([0-9]+) /in.php?link=$1<!--c2--></div><!--ec2--><br /><br />but every time I change the regular expression it goes all down the crapper...don't know why. <br /><br />I tried these and none work...only the [0-9]<br />(.+)<br />(.*)<br />([A-Za-z0-9]+)<br />([a-z0-9]+)<br /><br />HELP??? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/ph34r.gif" style="vertical-align:middle" emoid="h34r:" border="0" alt="ph34r.gif" /><!--content-->
Just a thought....<br /><br />You need to make sure that your redirect isn't recursive (i.e. that in.php won't trigger it). Otherwise I am thinking it could get messy very fast.<br /><br />...dave<!--content-->
Well..yeah that wouldn't be good...but the problem still remains. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
interesting... <br />I hadn't tried just using [A-Z] rather than [a-z]...<br />You would never guess what happened. <br /><br />I get this error on my apache log file. <br />RewriteRule: cannot compile regular expression '^([a-z]+)'<br /><br />Yet it goes perfectly through ^([A-Z]+)<br /><br />why the hell is it having problems with a lowercase list. Any ideas...<!--content-->