【发布时间】:2016-03-12 03:58:26
【问题描述】:
我对 Apache / mod_rewrite 完全陌生。我需要这样做
以下网址:
http://www.example.com/applications/seo-friendly-text-for-appA/some-random-php-page.php
应该显示为
http://www.example.com/applications/seo-friendly-text-for-appA
并重定向到位于名为“myappAfolder”的文件夹中的 some-random-php-page.php。我的网络文件夹结构如下:
<example-com-webroot>/applications/myappAfolder/some-random-php-page.php
如果我反其道而行之,比如输入以下网址
http://www.example.com/applications/myappAfolder/some-random-php-page.php
网址应显示为
http://www.example.com/applications/seo-friendly-text-for-appA
但同时重定向到所在的页面
<example-com-webroot>/applications/myappAfolder/some-random-php-page.php
我尝试了 SO 中提到的其他一些解决方案,但到目前为止还没有运气。我已经做了几个小时了
P.N: seo-friendly-text-for-appA 不是文件夹,它不存在于我的网络根目录中
【问题讨论】:
-
我不知道哪个巨魔对我投了反对票以及为什么
标签: apache .htaccess mod-rewrite seo