apache - add trailing slash and remove .htaccess -
how can that: website.com/store/ redirect website.com/store website.com/outbound/store/5 redirect website.com/outbound/store/5/
what want have urls without prefix remove trailing slash , prefix add trailing slash
my .htaccess:
options +followsymlinks rewriteengine on rewritecond %{request_filename} !-f rewriterule ^(.+)/$ /$1 [r=301,l] rewritecond %{request_filename} !-f rewriterule ^pa/?$ /admin/index.php [l,qsa] rewritecond %{request_filename} !-f rewriterule ^([^/]+)/?$ stores.php?store=$1 [l] rewritecond %{request_filename} !-f rewriterule ^outbound/([^/]*)/([^/]*)$ /outbound.php?type=$1&id=$2 [l]
options +followsymlinks rewriteengine on rewritebase / # force tailing slash urls starting /outbound/ rewriterule ^outbound/.*[^/]$ /$0/ [r=301,l] #remove tailing slash except urls starting /outbound/ rewritecond $1 !^outbound/ rewriterule ^(.+)/$ /$1 [r=301,l] rewriterule ^pa/?$ /admin/index.php [l,qsa] rewritecond %{request_filename} !-f rewriterule ^outbound/([^/]*)/([^/]*)/$ /outbound.php?type=$1&id=$2 [l] rewritecond %{request_filename} !-f rewriterule ^([^/]+)$ stores.php?store=$1 [l]
i cleaned bit.
Comments
Post a Comment