RewriteRule: foo.com/directory --> foo.com/directory/

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

 



Hi.

Using Apache 2, I want to create a RewriteRule within the '.htaccess'
file which redirects from:
http://foo.com/directory
to
http://foo.com/directory/

This last "directory" is a RewriteRule:
----------
RewriteRule ^([^/]+)/$ /directory.php?label=$1 [L]
---------

I tried adding this line
---------
RewriteRule ^(.*)$ /$1/ [R=301]
---------
after and before the last line, but I get this error message:
------
The page isn't redirecting properly
------

and the URL I get is:
http://foo.com/directory.php/?label=directory.php

What am I doing wrong? Thank you very much.

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