Forum Moderators: phranque
I would like my URL look like this: (at browser bar)
http://www.example.com/folder/abc
and the actual webpage at here:
http://www.example.com/folder/abc/index.htm
However, when running htaccess my URL address keep on redirect from "/abc" to "/abc/index.htm".
Below is my htaccess code:
---------------------------------------------------------------
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} folder
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !/$
Rewriterule ^(([^/]+/)*[^./]+)$ /$1/index.htm [L]
----------------------------------------------------------------
Can anyone help me to find out error on my htaccess code. Thanks.
Options +FollowSymLinks
RewriteEngine on
#
# If requested URL does not resolve to an existing file
RewriteCond %{REQUEST_FILENAME} !-f
# internally rewrite '/folder/<path>' URLs with no slash or period
# in the final path-part to /folder/<path>/index.htm
RewriteRule ^(folder/[^./]+)$ /$1/index.htm [L]
Jim
When typed in browser bar:
http://www.example.com/folder/abc
it will 301 redirected to and showing in browser bar as follow:
http://www.example.com/folder/abc/
(with slash included at the end of URL)
Any idea that might cause the trouble?