1
我使用RewriteRule
来创建SEO友好的网址。创建规则后,在错误的目录中查找外部文件。.htaccess重写加载错误目录中的文件
.htaccess文件代码:
# 1 -- Error 404 --
ErrorDocument 404 /NotFound.php
#2 -- IGNORE INDEX --
IndexIgnore *
#3 -- Default charter set --
AddDefaultCharset UTF-8
RewriteEngine On
RewriteRule ^questions/([0-9]+) questions.php?id=$1 [NC,L]
通常从css/filename.css
加载CSS。 应用重写规则后,从
加载文件如何创建一个RewriteRule
它只是改变URL行为,以及如何强制questions.php?id=34&title=something
到questions/34/something
自动?
使用在'questions.php'了'' 元素。 –
hjpotter92