Вернуться   Дизайнерский форум » ВЕБ-ПРОГРАММИРОВАНИЕ » ASP, Perl, PHP и MySQL

.htaccess мать его

Обсуждение темы .htaccess мать его в разделе ASP, Perl, PHP и MySQL, часть категории ВЕБ-ПРОГРАММИРОВАНИЕ; Второй день маюсь с .htaccess Установил сайт в сайт.ру /мой не рабочий сайт , главная страница работает, при переходе на внутреннии белый лист ...


Закрытая тема
 
Опции темы
Старый 15.07.2011, 19:16   #1
Второй день маюсь с .htaccess

Установил сайт в сайт.ру/мой не рабочий сайт, главная страница работает, при переходе на внутреннии белый лист и надпись:
No input file specified.

Цитата:
# Turn on URL rewriting
RewriteEngine On

# Installation directory
#RewriteBase /сайт/

# Protect application and system files from being viewed
RewriteRule ^(application|system) - [F,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php/$0 [PT,L]
# Rewrite all other URLs to index.php/URL

#RewriteCond %{HTTP_HOST} !^www\.сайт\.com$ [NC]
#RewriteRule ^(.*)$ http://www.сайт.com/$1 [L,R=301]
это существующий .htaccess, как я только не извращался с ним за 2 дня, так и не сделал, подскажите, что не так, на что исправить?

С таким .htaccess
Цитата:
RewriteEngine On
RewriteRule . index.php
все страницы сайта главные.

Спасибо.

Последний раз редактировалось 74ivan74; 15.07.2011 в 19:21..
 
Старый 15.07.2011, 19:16
Ссылки
Старый 25.07.2011, 15:42   #2
Пробуйте что-то типа
Цитата:
RewriteEngine On
RewriteBase /
RewriteRule (.*)$ мой_не_рабочий_сайт/$1 [L]
т.е. любые символы после доменного имени и / будут интерпретироваться с объектами файловой системы в папке мой_не_рабочий_сайт
 
Старый 25.07.2011, 15:59   #3
RewriteEngine On
RewriteBase /
RewriteRule (.*)$ voting/$1 [L]

Internal Server Error
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Там еще конфиг чудной, может дело в нем а не в .htaccess

PHP код:
<?php
/**
 * This file acts as the "front controller" to your application. You can
 * configure your application, modules, and system directories here.
 * PHP error_reporting level may also be changed.
 *
 * @see http://kohanaphp.com
 */

/**
 * Define the website environment status. When this flag is set to TRUE, some
 * module demonstration controllers will result in 404 errors. For more information
 * about this option, read the documentation about deploying Kohana.
 *
 * @see http://docs.kohanaphp.com/installation/deployment
 */
define('IN_PRODUCTION'FALSE);

/**
 * Website application directory. This directory should contain your application
 * configuration, controllers, models, views, and other resources.
 *
 * This path can be absolute or relative to this file.
 */
$kohana_application 'application';

/**
 * Kohana modules directory. This directory should contain all the modules used
 * by your application. Modules are enabled and disabled by the application
 * configuration file.
 *
 * This path can be absolute or relative to this file.
 */
$kohana_modules 'modules';

/**
 * Kohana system directory. This directory should contain the core/ directory,
 * and the resources you included in your download of Kohana.
 *
 * This path can be absolute or relative to this file.
 */
$kohana_system 'system';

/**
 * Test to make sure that Kohana is running on PHP 5.2 or newer. Once you are
 * sure that your environment is compatible with Kohana, you can comment this
 * line out. When running an application on a new server, uncomment this line
 * to check the PHP version quickly.
 */
version_compare(PHP_VERSION'5.2''<') and exit('Kohana requires PHP 5.2 or newer.');

/**
 * Set the error reporting level. Unless you have a special need, E_ALL is a
 * good level for error reporting.
 */
error_reporting(E_ALL & ~E_STRICT);

/**
 * Turning off display_errors will effectively disable Kohana error display
 * and logging. You can turn off Kohana errors in application/config/config.php
 */
ini_set('display_errors'TRUE);

/**
 * If you rename all of your .php files to a different extension, set the new
 * extension here. This option can left to .php, even if this file has a
 * different extension.
 */
define('EXT''.php');

//
// DO NOT EDIT BELOW THIS LINE, UNLESS YOU FULLY UNDERSTAND THE IMPLICATIONS.
// ----------------------------------------------------------------------------
// $Id: index.php 3915 2009-01-20 20:52:20Z zombor $
//

$kohana_pathinfo pathinfo(__FILE__);
// Define the front controller name and docroot
define('DOCROOT'$kohana_pathinfo['dirname'].DIRECTORY_SEPARATOR);
define('KOHANA',  $kohana_pathinfo['basename']);

// If the front controller is a symlink, change to the real docroot
is_link(KOHANA) and chdir(dirname(realpath(__FILE__)));

// If kohana folders are relative paths, make them absolute.
$kohana_application file_exists($kohana_application) ? $kohana_application DOCROOT.$kohana_application;
$kohana_modules file_exists($kohana_modules) ? $kohana_modules DOCROOT.$kohana_modules;
$kohana_system file_exists($kohana_system) ? $kohana_system DOCROOT.$kohana_system;

// Define application and system paths
define('APPPATH'str_replace('\\''/'realpath($kohana_application)).'/');
define('MODPATH'str_replace('\\''/'realpath($kohana_modules)).'/');
define('SYSPATH'str_replace('\\''/'realpath($kohana_system)).'/');

// install and redirect to landing page
$path=explode('.',$_SERVER['SCRIPT_NAME']);
$url=explode('/',$path[0]);
$cnt=count($url)-1;
$ur='';
for(
$i=0;$i<$cnt;$i++)
{
    
$ur.=$url[$i].'/';
}
$documentroot "http://".$_SERVER['HTTP_HOST'].$ur;


unset(
$kohana_application$kohana_modules$kohana_system);
if (
file_exists($d=DOCROOT.'/application/config/database.php'))
{    
    include_once 
'application/config/database.php';
    
$prefix=$config['default']['table_prefix'];
    
$host=$config['default']['connection']['host'];
    
$user=$config['default']['connection']['user'];
    
$pass=$config['default']['connection']['pass'];
    
$db=$config['default']['connection']['database'];
    
$link mysql_connect($host$user$pass) or die('Could not connect: ' mysql_error());
    
$tablename$prefix.'general_settings';

    
$tables mysql_list_tables($db);
    
$num_tables = @mysql_numrows($tables);
    
    
    if (
$num_tables==0)
    {
        
$docroot2=$_SERVER['REQUEST_URI'].'install/process'.EXT.'?docroot='.$documentroot
        
        
?>
        <script type="text/javascript">
        window.location = "<?php echo $docroot2?>";
        </script>
        <?php    
    
}
    else
    { 
            require 
SYSPATH.'core/Bootstrap'.EXT;     
    } 
    
?>
    
    
    <?php
}
else

    
$docroot3=$_SERVER['REQUEST_URI'].'install/preinstall'.EXT.'?docroot='.$documentroot;
    
?>
    <script type="text/javascript">
        window.location = "<?php echo $docroot3?>";
    </script>
    <?php

?>

Последний раз редактировалось 74ivan74; 25.07.2011 в 16:01.. Причина: Добавлено сообщение
 
Старый 25.07.2011, 17:31   #4
Тут важно где лежит файл htaccess, где указана корневая папка документов веб-сервера, где то для чего пишется htaccess. Вообще надо дерево файловой системы, чтобы понять что куда и как писать...

конфиги пыха тут не причем, до них не доходит...
 
Этот пользователь сказал спасибо piksel за это полезное сообщение:
74ivan74 (25.07.2011)
Старый 25.07.2011, 17:31
Закрытая тема




Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
.htaccess 74ivan74 Кальянная 1 03.01.2011 01:38
.htaccess handler Настройка серверов 2 24.08.2009 19:23
.htaccess Lavr ASP, Perl, PHP и MySQL 19 17.07.2008 20:23
.htaccess XTRIMAL ASP, Perl, PHP и MySQL 0 26.12.2006 17:05
.htaccess Dominikus ASP, Perl, PHP и MySQL 6 20.11.2006 20:28


Текущее время: 18:30. Часовой пояс GMT +4.

Реклама на форуме Условия размещения рекламы
Биржа ссылок Заработай на сайте!
Дизайнерский форум