Reply to Re: MOD rewrite novice here

Your name:

Reply:


Posted by colinross on 10/10/55 11:50

sunnysails@gmail.com wrote:
> -Lost wrote:
> > <IfModule mod_rewrite.c>
> > RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
> > RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
> > </IfModule>
> >
> > -Lost
>
> Hmm, that doesn't work. I place just that inside .htaccess, in my
> root, correct? :)

AFAIK, <IfModule> Blocks don't work in the .htaccess context:

If you are using an .htaccess file, then change the code to

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]

NOTE: If a rule/configuration fails (as in not parsing) in an .htaccess
file, Apache will return a 50x status code.

Plus, on a side note, there is no "RewriteEngine On" directive in the
posted code block, so that may be another reason.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация