View difference between Paste ID: DTHrWJYn and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | #my .htaccess |
2 | RewriteEngine On | |
3 | RewriteCond %{REQUEST_FILENAME} -s [OR] | |
4 | RewriteCond %{REQUEST_FILENAME} -l [OR] | |
5 | RewriteCond %{REQUEST_FILENAME} -d | |
6 | RewriteRule ^.*$ - [NC,L] | |
7 | RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ bootstrapClass.php [NC,L] | |
8 | ||
9 | RewriteCond %{REQUEST_URI} !^/public/ | |
10 | RewriteRule ^(.*)$ public/$1 [L] | |
11 | ||
12 | php_flag magic_quotes_gpc off | |
13 | php_flag register_globals off | |
14 | php_value session.auto_start 0 | |
15 | Options -Indexes | |
16 | ||
17 | #my index | |
18 | <?php | |
19 | header("location:index/index"); | |
20 | if I header("location:/index/index"); he redirect to | |
21 | localhost/index/index/ | |
22 | ||
23 | ||
24 | #indexAction | |
25 | public function indexAction(){ | |
26 | $this->_redirect("security/loginuser"); | |
27 | } | |
28 | ||
29 | #bootstrap class | |
30 | <?php | |
31 | define( 'ROOT', dirname( __FILE__ ) ); | |
32 | ||
33 | set_include_path( | |
34 | '.' | |
35 | . PATH_SEPARATOR.get_include_path() | |
36 | . PATH_SEPARATOR . ROOT . '/../library' | |
37 | . PATH_SEPARATOR . ROOT . '/app/models' | |
38 | . PATH_SEPARATOR . ROOT . '/app/util' | |
39 | . PATH_SEPARATOR . ROOT . '/../library/phpids-0.6.5/lib' | |
40 | ); | |
41 | ||
42 | include "Zend/Loader/Autoloader.php"; | |
43 | $autoloader = Zend_Loader_Autoloader::getInstance(); | |
44 | ||
45 | include "app/Initializer.php"; | |
46 | include "Messages.php"; | |
47 | include "Error.php"; | |
48 | ||
49 | try{ | |
50 | $front = Zend_Controller_Front::getInstance(); | |
51 | $front->registerPlugin(new Initializer('dev',ROOT)); | |
52 | $front->dispatch(); | |
53 | }catch(Zend_Controller_Action_Exception $e){ | |
54 | header("Location: " . BASE_URL . "/security/loginuser/error/".urlencode(Messages::getMessage("GENERAL","PAGE_NOT_FOUND"))); | |
55 | }catch(Exception $e){ | |
56 | print $e->getMessage(); | |
57 | } |