.htaccess从地址
问题描述:
隐藏问号
我在做什么错? 我有一个链接:.htaccess从地址
<a href="norma/something1/something2/something3/">Link Name</a>
我需要从陈词: eshop.mydomain.com/norma/something1/something2/something3/
这个地址:eshop.mydomain.com/norma-something1-something2-something3.html
我能做的唯一事情就是eshop.mydomain.com/?norma-something1-something2-something3.html
我需要隐藏问号,但我没有任何想法如何:(
这里是我的.htaccess
#php_value memory_limit 256M
RewriteEngine On
RewriteBase/
RewriteRule /index.php/[R=301]
RewriteRule ^norma/([^/]+)/([^/]+)/([\d\.]+)$ %{DOCUMENT_ROOT}/index.php?$1-$2&-$3.html [L,QSA]
ErrorDocument 404 /doc/e404/
答
你还说问号在你重写规则:
# right here -----------------------------------------------------------v
RewriteRule ^norma/([^/]+)/([^/]+)/([\d\.]+)$ %{DOCUMENT_ROOT}/index.php?$1-$2&-$3.html [L,QSA]
但我怀疑它可能是一对夫妇的事情,是造成这个重定向发生在它真的应该在服务器端进行内部重写时发生。试着改变你的规则是:
RewriteEngine On
RewriteBase/
# this L is important ------------v
RewriteRule ^/?index.php/[R=301,L]
RewriteRule ^norma/([^/]+)/([^/]+)/([\d\.]+)$ /index.php?$1-$2&-$3.html [L,QSA]
如果我用这个,我的网页抛出错误
'感动永久
该文件已移至此处。 此外,在试图使用ErrorDocument来处理request.' 这里遇到一个404 Not Found错误是代码:
'#php_value memory_limit的256M RewriteEngine叙述在 RewriteBase/ 重写规则^ /指数。 php/[R = 301,L] RewriteRule^norma /([^ /] +)/([^ /] +)/([\ d \。] +)$%{DOCUMENT_ROOT} /index.php? $ 1- $ 2- $ 3.html&pa = norma&stupen = $ 1&cislo = $ 2&datum = $ 3 [L,QSA] ErrorDocument 404/doc/e404 /' – 2012-08-08 05:18:19
@LeníkRostík当错误文档显示'搬到这里。“? – 2012-08-08 05:31:19
该文件已移动here. – 2012-08-08 05:35:35