【发布时间】:2017-05-05 23:44:20
【问题描述】:
我有一个基于 Google 地图的小型网络应用程序。我有这样的网址:
http://www.example.com/web.php?u=olives-restaurante-de-ensaladas-en-margarita
我想拥有这个:
http://www.example.com/web/olives-restaurante-de-ensaladas-en-margarita
所以我想将我的参数dynamic URLs 转换为semantic URLs
我怎样才能做到这一点?!
我尝试将以下代码放在我的.htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^web/([A-Z0-9]+)/$ web.php?u=$1
但遗憾的是,当我尝试访问 http://www.example.com/web/olives-restaurante-de-ensaladas-en-margarita 时,它会将我重定向到 404 页面。
我做错了什么?
【问题讨论】:
-
请注意,这个问题与
programming相关的 SEO 相关,遵循指南。 -
也许我的服务器不接受 Mod-Rewrite?我该如何检查?
标签: apache .htaccess mod-rewrite dynamic-url