Re: close to success with RewriteRule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



this is what i have in my .htaccess file and it seems to be ok according to log:
#.htaccess file
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(de|en|fr)/welcome/$    welcome/index.php?lang=$1 [L]

and in the log:
init rewrite engine with requested uri /se_internet/en/welcome/
pass through /se_internet/en/welcome/
[perdir L:/Webserver/se/internet/] add path info postfix: L:/Webserver/se/internet/en -> L:/Webserver/se/internet/en/welcome/
[perdir L:/Webserver/se/internet/] strip per-dir prefix: L:/Webserver/se/internet/en/welcome/ -> en/welcome/
[perdir L:/Webserver/se/internet/] applying pattern '^(de|en|fr)/welcome/$' to uri 'en/welcome/'
[perdir L:/Webserver/se/internet/] rewrite 'en/welcome/' -> 'welcome/index.php?lang=en'
split uri=welcome/index.php?lang=en -> uri=welcome/index.php, args=lang=en
[perdir L:/Webserver/se/internet/] add per-dir prefix: welcome/index.php -> L:/Webserver/se/internet/welcome/index.php
[perdir L:/Webserver/se/internet/] internal redirect with L:/Webserver/se/internet/welcome/index.php [INTERNAL REDIRECT]
init rewrite engine with requested uri L:/Webserver/se/internet/welcome/index.php
pass through L:/Webserver/se/internet/welcome/index.php


however i get error message:
Bad Request
Your browser sent a request that this server could not understand.

my welcome/index.php really and physically exists inside the folder "L:/Webserver/se/internet/"
so what am i doing wrong ?
:-(

thx.

On Tue, Sep 16, 2008 at 7:23 PM, Eric Covener <covener@xxxxxxxxx> wrote:
On Tue, Sep 16, 2008 at 1:21 PM, Alain Roger <raf.news@xxxxxxxxx> wrote:
> so if i understood well:
> RewriteBase http://my_ip_address/myroot/
> RewriteRule ^(de|en|fr)/welcome/$    welcome/index.php?lang=$1 [L]
>
> should work ?

No, the RewriteBase is just the url-path (not protocol/host/post)

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritebase

welcome/inde.php also has to be valid relative to your htaccess


--
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux