【发布时间】:2014-06-18 04:45:43
【问题描述】:
最初的网址是这样的:
site.com/fr/index.php?category/ololo
在 .htaccess 规则之后它看起来像:
site.com/fr/?category/ololo
如何删除“?”类别前的符号?
这是我的 .htaccess 文件:
# URL Rewriting DotClear 2
RewriteEngine On
RewriteRule ^fr/([\w-]+)/([\w-]+)$ index.php?category=$1 [L]
Redirect 301 /dotclear/ /fr/
Redirect 301 /dotclear/public/ /dtc/public
# mod_rewrite
RewriteBase /
RewriteRule ^([^\.]+)\index.php?$ $1 [NC,R=301,L]
RewriteRule ^([^\.]+)$ $1.php [NC,PT,L]
# Generic
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
#php_value register_globals 0
【问题讨论】:
-
/fr/是一个真实的目录吗?这个 .htaccess 在哪里? -
是的,有 /fr/ 和 /en/ 目录。 CMS 结构
-
这个 .htaccess 位于何处,您使用的是什么 CMS?
-
@СергейИлларионов 这应该有助于stackoverflow.com/questions/24969396/…
标签: apache .htaccess mod-rewrite