bostamaster Posted February 10, 2014 Share Posted February 10, 2014 Hellowhen I write mysite.com/boutique/something it redirects to mysite.comwhen i write mysite.com/boutique/ it redirects to mysite.combut when i do mysite.com/boutique (without the ending slash) i get mysite.com/var/www/mysite.com/web/ I used the following code RewriteEngine onRewriteBase /RewriteRule ^boutique/(.*)$ $1 [R=301,L] Here is the code of my htaccess file # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution# http://www.prestashop.com - http://www.prestashop.com/forumsSecFilterEngine OffSecFilterScanPOST OffSetEnv HTTP_MOD_REWRITE OnRewriteEngine onRewriteBase /RewriteRule http://pres.yukkaz.com/boutique http://pres.yukkaz.com/mobiles-d-occasion [R=301,NC,L]RewriteRule ^boutique/(.*)$ $1 [R=301,L]RewriteCond %{HTTP:Authorization} ^(.*)RewriteRule . - [E=HTTP_AUTHORIZATION:%1]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule . - [E=REWRITEBASE:/]RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]# ImagesRewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]# AlphaImageLoader for IE and fancyboxRewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]# DispatcherRewriteCond %{REQUEST_FILENAME} -s [OR]RewriteCond %{REQUEST_FILENAME} -l [OR]RewriteCond %{REQUEST_FILENAME} -dRewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^.*$ - [NC,L]RewriteCond %{HTTP_HOST} ^pres.yukkaz.com$RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]ExpiresActive OnExpiresByType image/gif "access plus 1 month"ExpiresByType image/jpeg "access plus 1 month"ExpiresByType image/png "access plus 1 month"ExpiresByType text/css "access plus 1 week"ExpiresByType text/javascript "access plus 1 week"ExpiresByType application/javascript "access plus 1 week"ExpiresByType application/x-javascript "access plus 1 week"ExpiresByType image/x-icon "access plus 1 year"FileETag INode MTime SizeAddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript#If rewrite mod isn't enabledErrorDocument 404 /index.php?controller=404# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Thank you for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now