0
  1. 自从我将我的网站从 GoDaddy 转移到 myhosting 后,我的网址似乎发生了变化。在 Godaddy 上,我的网站非常慢。所以我决定把它移到Myhosting。但我看到我网站的 URL 已更改。请参阅此链接。

    http://www.bontonwear.com/products.php?product=Guardians-of-the-Galaxy-Jacket http://www.bontonwear.com/products/Guardians-of-the-Galaxy-Jacket.html http: //www.bontonwear.com/products/Guardians-of-the-Galaxy-Jacket

如您所见,这些所有 URL 都已更改,但都打开了相同的产品。我希望它看起来像这样。

http://www.bontonwear.com/products/Guardians-of-the-Galaxy-Jacket.html

简单页面也是如此。

http://www.bontonwear.com/pages/contact-us.html
http://www.bontonwear.com/pages/contact-us
http://www.bontonwear.com/pages.php?pageid=10

那么我将如何通过.htaccess 来实现它,或者有什么方法可以帮助我。我的 .htaccess 文件

https://www.dropbox.com/s/6x7ebzhb4b2lpm8/.htaccess
4

1 回答 1

1

在:

管理员->设置->商店设置

寻找搜索引擎友好的 URL:

并设置为启用(如果可用或是),但请注意,如果您将其设置为是并且您的 htaccess 无法正常工作,那么您的页面将无法加载。

您的 htaccess 文件看起来是自定义的。

如果您需要默认的 htaccess 文件进行比较,这里是我的(这是 ISC 6.1.1):

Options -MultiViews +FollowSymlinks -Indexes

# Force 401 pages to use a valid error document
# so they do not fall back to the 404 which is
# triggered by ISC. This allows HTTP Auth to work
# correctly
ErrorDocument 401 "Unauthorized access"

<IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed, but better safe than sorry.
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    # If your server is running PHP in CGI mode you will probably need to uncomment the following lines
    # Only uncomment lines that begine with Rewrite

    # The RewriteBase should be set to the same value as the AppPath setting in your config.php WITH a / on the end
    # RewriteBase /

    # This rewrite base rule is only required if you are getting 401 unauthorized errors when placing an order with Google Checkout
    # RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
    #
    # Alternatively, if the above does not work, try uncommenting this line below instead:
    # SetEnvIfNoCase Authorization "Basic ([a-z0-9=]+)" REMOTE_AUTHORIZATION=$1

    RewriteCond %{REQUEST_FILENAME} robots.txt
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule robots.txt robots_default.txt [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php
    <IfModule mod_env.c>
        SetEnv SEO_SUPPORT 1
    </IfModule>
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>
于 2014-09-25T20:07:56.337 回答