Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup a redirect/rewrite so that the urls end with / (trailing slash) (for making seo friendly).

However there are other internal rewrites, which are not shown in the browser address bar. I want to be able to redirect first with trailing / on the address bar and then perform those internal rewrites.

when i try to put this rule at the start, all the internal rewrites get displayed in the address bar :

Currently i have rewrite rule :

`url.rewrite-once = (
^/([0-9_-]+)(?:\?(.*))?" => "/path/www/index.php?cmd=alias&target=$1&$2",
<second condition> => <relative uri>
<third condition> => <relative uri>

Here is the rule i wanted to add.

Rule used: url.redirect = ("^(.*[^/])$" => "$1/")

But this also shows my internal path on url. e.g:

I just want to add a trailing slash ( in the address bar-visible) , leaving every thing else untouched.

FYI: my modules are in correct order too, i tried guglling (mod_rewrite/ fastcgi and alias with redirect) Any pointers in the right direction would be highly appreciated.

share|improve this question
something none is aware of :^) – tike Feb 14 '13 at 18:15

Ok, I found a solution/ workout for this. As described before i had rewrite-once for all host, and i needed redirect which was showing up physical path.

After scratching my head hard, and reading all around over lightty posibility.

This will help you put path as a record

url.rewrite-once = (
    "^/show(.*)$"  => "$0"

Doing that upcoming step

This will help you redirect anything to holding path from above rewrite once and push you trailing / on the end.

url.redirect = (
    "^(.*[^/])$" => "$1/"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.