2013-08-20 4 views
0

비슷한 문제가 있었지만 문제가 해결되지 않았다는 것을 알고 있습니다.Opencart .htaccess config issue

저는 Opencart 1.5.5.1을 사용하고 있습니다. 우리는 최근 링크가 완전히 다르기 때문에 웹 사이트를 업데이트하여 매우 많은 수의 링크를 리디렉션했습니다. 문제는 그들이 작동하지 않는다는 것입니다.

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 
# 2. In your opencart directory rename htaccess.txt to .htaccess. 
# For any support issues please visit: http://www.opencart.com 

Options +FollowSymlinks 

# Prevent Directoy listing 
Options -Indexes 

# Prevent Direct Access to files 
<FilesMatch "\.(tpl|ini|log)"> 
Order deny,allow 
Deny from all 
</FilesMatch> 

# SEO URL Settings 
RewriteEngine On 
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie./becomes /shop/ 

RewriteBase/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] 
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] 
RewriteRule ^download/(.*) /index.php?route=error/not_found [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] 

### Additional Settings that may need to be enabled for some servers 
### Uncomment the commands by removing the # sign in front of it. 
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. 

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: 
# php_flag register_globals off 

# 2. If your cart has magic quotes enabled, This may work to disable it: 
# php_flag magic_quotes_gpc Off 

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try 
# php_value upload_max_filesize 999M 

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields 
# php_value post_max_size 999M 

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields 
# php_value max_execution_time 200 

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields 
# php_value max_input_time 200 

# 7. disable open_basedir limitations 
# php_admin_value open_basedir none 

RewriteRule ^downloads.asp$ http://www.example.com/downloads [R=301,L] 

#301 redirect 
Redirect 301 /onlinestore http://mywebsite.com.au 
Redirect 301 /gallery.html http://mywebsite.com.au 
Redirect 301 /Images/getaflatstomachoct2012.pdf http://mywebsite.com.au 
Redirect 301 /onlinestore/all-products/allvia-melatonin-3-cream-57g http://mywebsite.com.au 
Redirect 301 /aboutus.html http://mywebsite.com.au/about_us 
Redirect 301 /meetus.html http://mywebsite.com.au/about_us 
Redirect 301 /mission.html http://mywebsite.com.au/about_us 
Redirect 301 /articleselectprotein.html http://mywebsite.com.au/blogs 
Redirect 301 /enewsletters.html http://mywebsite.com.au/blogs 
Redirect 301 /enewsletters/april2013/april2013.html http://mywebsite.com.au/blogs 
Redirect 301 /enewsletters/june2010/enewsletterjune2010.html http://mywebsite.com.au/blogs 
Redirect 301 /enewsletters/june2013/june2013.html http://mywebsite.com.au/blogs 
Redirect 301 /enewsletters/october2012/october2012.html http://mywebsite.com.au/blogs 
Redirect 301 /proteintablelarge.html http://mywebsite.com.au/blogs 
Redirect 301 /enewsletters/november2011/november2011.html http://mywebsite.com.au/blogs/christmas-survival-guide.html 
Redirect 301 /enewsletters/march2011/march2011.html http://mywebsite.com.au/blogs/digestion-boost-energy-recover-better-be-happier.html 
Redirect 301 /enewsletters/february2011/february2011.html http://mywebsite.com.au/blogs/fat-loss-during-your-lunch-break.html 
Redirect 301 /enewsletters/june2012/june2012.html http://mywebsite.com.au/blogs/living-healthier-by-alkalising-your-body-what-it-means-and-how-to-achieve-it..html 
Redirect 301 /enewsletters/august2010/enewsletteraugust2010.html http://mywebsite.com.au/blogs/marathon-triathlon-and-endurance-supplementation-guide.html 
Redirect 301 /articletop10fattips.html http://mywebsite.com.au/blogs/psn-s-top-10-fat-loss-tips.html 
Redirect 301 /enewsletters/september2010/enewsletterseptember2010.html http://mywebsite.com.au/blogs/psn-s-top-10-fat-loss-tips.html 
Redirect 301 /enewsletters/march2012/march2012.html http://mywebsite.com.au/blogs/q-a-we-answer-frequently-asked-questions.html 
Redirect 301 /enewsletters/may2012/may2012.html http://mywebsite.com.au/blogs/supplement-packs-for-your-goal.html 
Redirect 301 /enewsletters/november2010/enewsletternovember2010.html http://mywebsite.com.au/blogs/supplement-packs-for-your-goal.html 
Redirect 301 /enewsletters/july2011/july2011.html http://mywebsite.com.au/blogs/zma-better-sleep-sex-recovery-and-more.html 
Redirect 301 /contactus.html http://mywebsite.com.au/contact 
Redirect 301 /maplarge.pdf http://mywebsite.com.au/contact 
Redirect 301 /benefits.html http://mywebsite.com.au/membership-terms-and-conditions.html 
Redirect 301 /memberform.html http://mywebsite.com.au/membership-terms-and-conditions.html 
Redirect 301 /terms.html http://mywebsite.com.au/membership-terms-and-conditions.html 
Redirect 301 /onlinestore/accessories-1/all-accessories?page=1 http://mywebsite.com.au/accessories 
Redirect 301 /onlinestore/accessories-1/all-accessories?page=2 http://mywebsite.com.au/accessories 
Redirect 301 /onlinestore/accessories-1/all-accessories?page=3 http://mywebsite.com.au/accessories 
Redirect 301 /onlinestore/accessories-1/all-accessories?page=4 http://mywebsite.com.au/accessories 
Redirect 301 /onlinestore/accessories-1/all-accessories/advanced-fitness-manta-ray http://mywebsite.com.au/accessories 

리디렉션에서 계속 :

이 내 htaccess로 파일이 모습입니다. 그래서 문제가있다 : 당신이 원래 주소로 이동 - 언제

가 : 이 http://www.mywebsite.com.au/onlinestore/accessories-1/all-accessories/advanced-fitness-manta-ray

- 그것은 여기로 리디렉션해야합니다 http://mywebsite.com.au/accessories

가 간다 -하지만 : 경로 = onlinestore/액세서리 - 1/all-accessories/advanced-fitness-manta-ray "> http://mywebsite.com.au/accessories-1/all-accessories/advanced-fitness-manta-ray? route = onlinestore/accessories-1/all-accessories/advanced-fitness-manta-ray

문제는 올바른 새 사이트로 이동하지만 이 추가 되었습니까? route = 다음에 원래 URL이옵니다.

나는 지원을 얻으려고했지만 성공을 거두지 못했습니다. 전혀 지원을받을 수 있다면 매우 감사 할 것입니다.

감사합니다, 헬렌

답변

0

당신은 그렇지 않으면 실행되지 것이라고 RewriteEngine On 라인 전에 리디렉션 모든 명령을 배치해야