开发者

.htaccess exclude specific file in webroot from URL rewriting

开发者 https://www.devze.com 2023-01-20 06:46 出处:网络
i am running a site with joomla. It has a bunch of mod rewrite rules i don\'t totally understand.. as well as some kind of SEF link thing running.

i am running a site with joomla. It has a bunch of mod rewrite rules i don't totally understand.. as well as some kind of SEF link thing running.

i have a specific page named sched.html that i need to serve up and be completely ignored from the .htaccess.

I have tried everything i can possibly think of. including a number of recommendation from people开发者_JS百科 in the Joomla forums and for the life of me i cannot get this working.

ANY help is appreciated!


You should have that line already in your .htaccess:

RewriteRule (.*) index.php

If not, post your complete .htaccess here.

Prepend this line with the following:

RewriteCond %{REQUEST_URI} !/sched\.html

The final result should look similar to this code:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteCond %{REQUEST_URI} !^/sched\.html
RewriteRule (.*) index.php
0

精彩评论

暂无评论...
验证码 换一张
取 消