【问题标题】:How to convert friendly url to original url如何将友好的网址转换为原始网址
【发布时间】:2012-09-27 22:24:00
【问题描述】:

我有一个已使用 .htaccess 转换为 SEO 友好 url 的 URL。但现在我需要找到原始 url,以便我可以编辑文件并在 Web 服务器上找到它。转换后的友好 url 是

是否可以取回原来的url,以便在服务器上定位。谢谢您的建议。

.htaccess 文件查看。

# 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]
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

【问题讨论】:

    标签: php .htaccess seo friendly-url


    【解决方案1】:

    看来网址应该是

    http://www.mycorporateservices.com/index.php?_route_=Corporate-Services
    

    Opencart 使用动作和控制器来解析参数并显示页面。您应该寻找&lt;web_app&gt;/controller/module&lt;web_app&gt;/catalog/controller/module 文件夹,那里可能有Corporate-Services.php

    【讨论】:

    • 感谢JScoobyCed 的建议。我之前已经这样做过并搜索了我的 index.php 但它没有类似的东西。你能告诉我如何在我的网络服务器上保存这个文件吗?谢谢
    • Opencart 使用模板,您应该尝试寻找templates 文件夹或controller 文件夹
    猜你喜欢
    • 1970-01-01
    • 2015-04-30
    • 1970-01-01
    • 1970-01-01
    • 2012-01-10
    • 2011-12-12
    • 2012-10-15
    • 2011-02-15
    • 2014-01-12
    相关资源
    最近更新 更多