section31 Posted April 28, 2004 Posted April 28, 2004 http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html http://www.engelschall.com/pw/apache/rewriteguide/ After reading through these...I still can't get this darn simple mod rewrite rule to work. Can anyone help. Trying to have this... ex. www.****/123 redirect to www.****/in.php?link=123 This is what I have, Am I even close? >RewriteEngine on RewriteRule ^/(.*) /in.php?link=$1 [R] Thanks for your time, Dave Quote
section31 Posted April 28, 2004 Author Posted April 28, 2004 UPDATE: I got it working with the following... >RewriteEngine on RewriteRule ^([0-9]+) /in.php?link=$1 but every time I change the regular expression it goes all down the crapper...don't know why. I tried these and none work...only the [0-9] (.+) (.*) ([A-Za-z0-9]+) ([a-z0-9]+) HELP??? Quote
Wilexa Posted April 28, 2004 Posted April 28, 2004 Just a thought.... 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. ...dave Quote
section31 Posted April 28, 2004 Author Posted April 28, 2004 Well..yeah that wouldn't be good...but the problem still remains. Quote
section31 Posted April 28, 2004 Author Posted April 28, 2004 interesting... I hadn't tried just using [A-Z] rather than [a-z]... You would never guess what happened. I get this error on my apache log file. RewriteRule: cannot compile regular expression '^([a-z]+)' Yet it goes perfectly through ^([A-Z]+) why the hell is it having problems with a lowercase list. Any ideas... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.