php - Rewrite Rules doesnt't work htaccess -


i'm doing rewrite url on htacces after installation of new website discover old url can visible on google. want redirect these url on home.

this htaccess moment :

redirectpermanent /test2 / redirectpermanent /test / redirectpermanent /accueil / redirectpermanent /decouvrir /   rewriteengine on rewritecond %{http_host} ^monsite.com$ rewriterule ^(.*) http://www.monsite.com/$1 [qsa,l,r=301] # rewritecond %{the_request} ^[a-z]+\ /([^/]+/)*index(\.[a-z0-9]+)?[^\ ]*\ http/ # rewriterule ^(([^/]+/)*)index(\.[a-z0-9]+)?$ http://www.monsite.com/$1?[r=301,l] rewritecond %{http_host} ^monsite\.com$ rewriterule ^(.*)$ "http\:\/\/www\.monsite\.com\/$1" [r=301,l] # begin -- pluxml options -multiviews rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !-l # réécriture des urls rewriterule ^(?!feed)(.*)$ index.php?$1 [l] rewriterule ^feed\/(.*)$ feed.php?$1 [l] # end -- pluxml 

at moment 1 redirection work , redirectpermanent /test / others doesn't work , don't know why.

it appreciate if found solution problem..

thanks

best regards

rewriteengine on rewritebase / options +followsymlinks   rewriterule ^test2$ / [r=301,l] rewriterule ^test$ / [r=301,l] rewriterule ^accueil$ / [r=301,l] rewriterule ^decouvrir$ / [r=301,l]  rewritecond %{http_host} ^monsite\.com$ rewriterule ^(.*)$ "http\:\/\/www\.monsite\.com\/$1" [r=301,l] # begin -- pluxml options -multiviews rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !-l  # réécriture des urls rewriterule ^(?!feed)(.*)$ index.php?$1 [l] rewriterule ^feed\/(.*)$ feed.php?$1 [l] 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -