hoho Posted August 18, 2015 Report Share Posted August 18, 2015 Sveiki, Kā ar mod_rewrite uztaisīt lai no www.site.com/link1/link2 būtu redirekts uz www.site.com/link1/link2/ Lai beigās būtu "/" ? Pašlaik ir šāds RewriteRule : RewriteRule ^(.*/)?([a-zA-Z0-9_-]+)(/)$ index.php?area=$2 [QSA,L] Quote Link to comment Share on other sites More sharing options...
Roze Posted August 18, 2015 Report Share Posted August 18, 2015 Idejiski Apache (ja ir nokompilēta ar mod_dir) noklusēti redirektē no site.com/dir uz site.com/dir/ ( http://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryslash ) Bet nu ja tieši ar rewraitu vajag tad kaut kā tā:RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^(.+[^/])$ $1/ [R] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.