Re: Help with mod_rewrite

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

 



Frank Arensmeier wrote:
The problem is when a user requests a URL like:

http://myserver.com/en/about

Apparently, Apache does an internal redirect because it is looking for the index.php file (which exists) in the folder "about". The thing I do not understand is why the user is being redirected to http://myserver.com/about???

I think there's an external redirect to /about/ (notice the trailing slash). This is normal procedure done by mod_dir. Use a RewriteRule, which fixes the trailing slash problem.

RewriteCond %{REQUEST_URI} !/$
RewriteRule !\.[a-z]{2,4}$ %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(se|en|us)/(.+) /$2 [E=LANG_CODE:$1]

--
Bob

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


[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