Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z htaccess - Zend Framework, Ubuntu Server 14.04
Forum PHP.pl > Forum > Serwery WWW
tomekpl
Witam, mam problem z odpaleniem linku, przekierowaniem htaccess w moim projekcie.
Postawiłem sobie lokalną maszynę na Ubuntu Server 14.04

Zrobiłem virtualhost, wgrałem pliki strony etc
Mod_rewrite jest włączony na serwerze.


Strona odpala się pod adresem projekt.srv, ale juz nie łapie jak przechodzi mi np do projekt.srv/rejestracja
Cytat
Not Found

The requested URL /rejestracja was not found on this server.


Konfiguracja etc/apache2/sites-available/projekt.conf

Cytat
<VirtualHost *:80>

ServerName projekt.srv

ServerAdmin webmaster@localhost

DocumentRoot /home/web/projekt/public


<Directory /home/web/projekt/public>
Options Indexes FollowSymLinks MultiViews
Order allow,deny
allow from all
AllowOverride All
Require all granted
</Directory>


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


plik .htaccess

Cytat
# Character encoding
#AddDefaultCharset utf-8
#AddType 'text/css; charset=utf-8' .css
#AddType 'text/html; charset=utf-8' .html

#AliasMatch /module/([^/]+)/(.*) ./../application/modules/$1/public/$2 - musi byc w vhost

RewriteEngine On

# RewriteCond %{HTTP_HOST} ^panel.*\.pl$
# RewriteCond %{SERVER_PORT} 80
# RewriteCond ^.(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

#RewriteCond %{REQUEST_FILENAME} -s [OR]
#RewriteCond %{REQUEST_FILENAME} -l [OR]
#RewriteCond %{REQUEST_FILENAME} -d
#RewriteRule ^.*$ - [NC,L]
#RewriteRule ^.*$ index.php [NC,L]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./index.php [L]
</IfModule>
LowiczakPL
RewriteRule ./index.php [L]

zmień na

RewriteRule ^(.*)$ index.php?$1 [QSA,L]

i zobacz czy to zadziała
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.