歡迎您光臨本站 註冊首頁

請幫幫我 htaccess文件問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

請幫幫我 htaccess文件問題

請幫幫我 htaccess文件問題
# Prevent .htaccess and .htpasswd files from being viewed by web clients
<Files "^\.ht">
Order allow,deny
Deny from all
</Files>

# Protect files
<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">
Order deny,allow
Deny from all
</Files>

# Protect directories
<Files ~ "^(backup|files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">
Order deny,allow
Deny from all
</Files>

# Disable directory browsing
Options -Indexes

# Follow symbolic links in this directory
Options +FollowSymLinks

# Override PHP settings that cannot be changed at runtime
# (If your server supports PHP settings via htaccess you can comment following two lines off)
# php_value register_globals 0
# php_value session.auto_start 0

# Customized error messages
# ( If you are running in a subfolder please add it, example: "directory/index.php?httpstatus=404" )
ErrorDocument 404 index.php?httpstatus=404

# Set the default handler
DirectoryIndex index.php

# URL rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On


#Make sure RewriteBase points to the directory where you installed phpLD.
#Example: "/phpld" if your installation is in a "phpld" subdirectory.

#RewriteBase /

##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-links\.htm?$ index.php?list=latest

##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^top-hits\.htm?$ index.php?list=top

##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.htm?$ index.php?list=latestarticles

##Details Link Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)detail/link-(.*)\.htm?$ detail.php

##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/article-(.*)\.htm?$ article.php

##Author Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)authors/author-(.*)\.htm?$ author.php

##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-+\.html$ index.php

##Pages redirect
RewriteCond %{REQUEST_URI} !page-+\.html?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)\.html$ page.php?name=$1

##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php
</IfModule>




上面是文件代碼 一上傳到空間運行就出現下面的樣子


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



我用的是phpld 3.3 國外的!

[火星人 ] 請幫幫我 htaccess文件問題已經有655次圍觀

http://coctec.com/docs/service/show-post-32116.html