1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Rep Power
    I am having difficulty in redirecting my URL address to my homepage. It is a wap site and I am trying to set it up so that users don't have to type in the trailing slash e.g. wap.test.com. However, unless I type in the trailing slash it crashes the phone. Any ideas ? Is this a common problem with apache. The rewrite is as follows :-

    ServerName wap.test.com
    DocumentRoot /apps/test/cgi-bin/wap
    DirectoryIndex splash.wml
    ErrorLog /apps/test/logs/wap/error_log
    TransferLog /apps/test/logs/wap/access_log
    RewriteEngine on
    RewriteRule ^wap$ wap/ [R]

  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    It seems odd. Are you sure you have mod_dir?
    You should if your DirectoryIndex is functioning. Also, you then don't need to use any RewriteRule at all since /wap is within your docroot (not visible in URL as it's not a relative URL path), mod_dir should take care of this by default. Check here to find out more -> http://www.apache.org/docs/mod/mod_dir.html

    You should use mod_rewrite if your docroot is /apps/test/cgi-bin and /wap is a relative URL path. Then, of course, you would also need to specify a "RewriteBase /wap" inside a <Directory> block at "<Directory /apps/test/cgi-bin>.

    Maybe you can TRY adding a RewriteCond and use a different RewriteRule as follow:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^$
    RewriteRule .* $1/ [R]

    [This message has been edited by freebsd (edited October 03, 2000).]

IMN logo majestic logo threadwatch logo seochat tools logo