.htaccess Url重写在子目录创建运行时中不起作用显示空白页

.htaccess Url重写在子目录创建运行时中不起作用显示空白页,.htaccess,url-rewriting,.htaccess,Url Rewriting,我正在做我的某个项目。我面临的主要问题是通过.htaccess重写url 我只是想写 http://www.domain.com.au/servives.php?alphabet=a至http://www.domain.com.au/cat/alphabet/a.htm使用规则重写规则^cat/alphabet/([^/]+)\.htm$/services.php?alphabet=$1[NC,PT] 我的Total.htaccess文件包含 但是,当我在浏览器中键入时,会打开一个空白页 打开一

我正在做我的某个项目。我面临的主要问题是通过.htaccess重写url 我只是想写
http://www.domain.com.au/servives.php?alphabet=a
http://www.domain.com.au/cat/alphabet/a.htm
使用规则
重写规则^cat/alphabet/([^/]+)\.htm$/services.php?alphabet=$1[NC,PT]

我的Total.htaccess文件包含 但是,当我在浏览器中键入时,会打开一个空白页 打开一个空白页,但其中包含源代码。显示没有错误,但仍为空白

如果我添加额外的参数[R],那么它重定向到原始页面外部重定向工作正常。我花了至少一周的时间在这上面,非常困惑。非常感谢你的帮助。 它使用此重定向(附加R标志)

RewriteRule^cat/alphabet/([^/]+)\.htm$/services.php?alphabet=$1[NC,R]


为什么不在内部重定向?

嘿,freinds,我自己得到了答案。。发布可能有其他帮助:)。此问题是由于我在文件中包含的文件路径都已分发,因为我提供了所有相对路径而不是绝对路径,这导致了此问题。请在标题部分使用此选项从根目录解析url。这将解决此问题
Options +FollowSymlinks
RewriteEngine on
Options +Indexes
RewriteBase /


//commented// This rule to resolve cononicalization

RewriteCond %{HTTP_HOST} ^domain.com.au
RewriteRule (.*) http://www.domain.com.au/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domain.com.au/ [R=301,L]
RewriteRule ^cat/alphabet/([^/]+)\.htm$ /services.php?alphabet=$1 [NC,PT]