我有我的根web文件夾public_html /安裝我的信息網頁使用重寫規則(SEO)。在子文件夾public_html/shop /中,我安裝了Opencart,因此對購物車的訪問是http://www.mydomain.com/shop/。每個文件夾public_html,public_html_shop /都有自己的.htaccess文件。opencart - multistore和rewritebase
我想使用OC1551作爲多個域重定向到此文件夾,但也作爲www.mydomaincom /店/ - 不重定向:www.mydomain1.com,www.mydomain2.com和也作爲www.mydomain .com/shop/
* public_html/shop/.htaccess *文件需要將rewritebase設置爲/ shop /以正確使用信息網頁,因爲使用www.mydomain.com/的重寫規則,但對於www.mydoaminX .com需要設置爲rewritebase /。 你可以請某人幫我在這些文件夾中設置rewritebase來正確工作嗎?像在public_html/shop/.htaccess文件中動態改變rewritebase的東西。
感謝
文件的public_html /的.htaccess
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^.*$ http://www.mydomain.sk/$0 [NC,L,R=301]
RewriteRule ^(.*)/(.*)-([1-9])/(.*)/$ /index.php?category=$1&page=$2&gallery_page=$3&photo=$4 [L,QSA]
RewriteRule ^(.*)/(.*)/(.*)/$ /index.php?category=$1&page=$2&photo=$3 [L,QSA]
RewriteRule ^(.*)/(.*)-([1-9])/$ /index.php?category=$1&page=$2&gallery_page=$3 [L,QSA]
RewriteRule ^(.*)/(.*)/$ /index.php?category=$1&page=$2 [L,QSA]
RewriteRule ^(.*)/$ /index.php?category=$1 [L,QSA]
Rewriterule ^subscribe.php(.*)$ /index.php?category=overenie&addr=$1 [L,QSA]
Rewriterule ^sitemap.xml$ /webmap.php?engine=google [L,QSA]
Rewriterule ^urllist.txt$ /webmap.php?engine=yahoo [L,QSA]
文件的public_html /店/的.htaccess
RewriteEngine On
RewriteBase /shop/
RewriteCond %{HTTP_HOST} ^maydomain1\.com$ [NC]
RewriteRule ^.*$ http://www.mydomain1.com/$0 [NC,L,R=301]
RewriteCond %{HTTP_HOST} ^mydomain2\.com$ [NC]
RewriteRule ^.*$ http://www.mydomain2.com/$0 [NC,L,R=301]
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]