如何友好的URL转换为原始地址 [英] How to convert friendly url to original url

查看:324
本文介绍了如何友好的URL转换为原始地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用.htaccess.But转化成搜索引擎友好的URL网址现在我需要找到原来的URL,这样我可以编辑文件,找到它的网站伺服器转换友好的URL上

时,可以拿回原始地址,以便它可以位于server.Thank您的建议。

.htaccess文件视图。

 #1.To使用网址别名,你需要运行的Apache与mod_rewrite的启用。

#2,在您的opencart目录命名htaccess.txt为.htaccess。

#对于任何支持问题,请访问:http://www.opencart.com

选项​​+的FollowSymLinks

#prevent Directoy上市
选项​​-Indexes

#prevent直接访问文件
< FilesMatch\(TPL | INI |日志)>
 订单拒绝,允许
 所有拒绝
< / FilesMatch>

#搜索引擎优化的URL设置
RewriteEngine叙述上
#如果您opencart安装不上主Web文件夹中运行,确保你的文件夹它在IE浏览器中运行。 /变/店/

的RewriteBase /
重写规则^ sitemap.xml的$的index.php?路径=进/ google_sitemap [L]
重写规则^ googlebase.xml $的index.php?路径=进/ google_base [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
的RewriteCond%{REQUEST_URI} * \!。(ICO | GIF | JPG | JPEG | PNG | JS | CSS)
重写规则^([^] *)的index.php?_route _ = $ 1 [L,QSA]

###启用了一些服务器,可能需要额外的设置
###取消注释,即删除#符号在它前面的命令。
###如果你得到一个内部服务器错误500启用以下任何设置后,恢复#,因为这意味着你的主机不允许的。

#1,如果你的车只允许你添加一个项目的时间,有可能register_globals的是。这可以工作,可以禁用它:
#的php_flag register_globals的关闭

#2,如果你的车,使魔术引号,这可能工作来禁用它:
#的php_flag magic_quotes_gpc的关

#3.设置最大上传文件的大​​小。大多数主机将限制这一点,并不允许它被覆盖,但你可以试试
#php_value的upload_max_filesize 999M

#4集后的最大规模​​。如果你有很多的产品选项或正在得到错误的地方形式不保存所有字段去掉这一行
#php_value的post_max_size 999M

#5,设定最大时间脚本可以采取。如果你有很多的产品选项或正在得到错误的地方形式不保存所有字段去掉这一行
#php_value max_execution_time仅仅200

#6,设置最大时间输入要:收到。如果你有很多的产品选项或正在得到错误的地方形式不保存所有字段取消注释这一行
#php_value max_input_time设置200
 

解决方案

这似乎网址应为

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

Opencart使用操作和控制器来解析参数并显示该网页。你应该寻找一个< web_app> /控制器/模块< web_app> /目录/控制器/模块文件夹,有可能是企业-Services.php

I have a URL which has been converted into SEO friendly url using .htaccess.But now i need to find the original url so that i can edit the file and locate it on the web server.The converted friendly url is

Is is possible to get back the original url so that it can be located on the server.Thank you for your suggestions.

.htaccess file view.

# 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

解决方案

It seems the URL would be

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

Opencart uses action and controller to parse the parameters and display the page. You should look for a <web_app>/controller/module or <web_app>/catalog/controller/module folder and there probably the Corporate-Services.php

这篇关于如何友好的URL转换为原始地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆