Jump to content

Mod Rewrite Problem....


section31

Recommended Posts

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

Link to comment
Share on other sites

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??? :)

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...