Jump to content

Alcedema

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Alcedema's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, I am one step further with adding trailing slashes when the user misses them out. I have a set of rewrite mod lines which change the incoming address, but they gave a 404 if the user did not add a trailing slash. So I started with redirectmatch lines. These work. This is what I have: RewriteEngine on RewriteRule ^([^/]*)/$ /home/nominis/public_html/dev/index.php?id=$1 RewriteRule ^([^/]*)/([^/]*)/$ /home/nominis/public_html/dev/index.php?id=$1&id2=$2 RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ /home/nominis/public_html/dev/index.php?id=$1&id2=$2&id3=$3 RedirectMatch ^/dev/([^/]*)$ http://www.nominis.net/dev/$1/ RedirectMatch ^/dev/([^/]*)/([^/]*)$ http://www.nominis.net/dev/$1/$2/ RedirectMatch ^/dev/([^/]*)/([^/]*)/([^/]*)$ http://www.nominis.net/dev/$1/$2/$3/ Now the redirectmatch works with 2 and 3 variables, but the first line, the one with one variable, doesn\'t work. Always gives \"index.php\" instead of the actual given variable. Also, the redirectmatch line with 2 variables, always puts 2 slashes on the end, instead of one. Is it going through two matches? Anything someone can add?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.