Autor Zpráva
vlado123
Profil
Nedarí sa mi rozbehať mod rewrite na domácom počítači.
Nastavenie apache je nasledovné pre adresár s dokumentami mám nastavené

Options Indexes +FollowSymLinks ExecCGI Includes MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes

AllowOverride All

# Controls who can get stuff from this server.
Order allow,deny
Allow from all

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
#<IfModule mod_authz_host.c>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>
#</IfModule>

V .htaccess je nastavené nasledovné:

RewriteEngine On
RewriteBase /

# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Pri zapnutých clear url to vyhodí 404

Ďakujem.
kletely
Profil
# Rewrite current-style URLs of the form 'index.php?q=x'. 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^/(.*)$ /index.php?q=$1 [L,QSA]

Možno teraz to pôjde :)
vlado123
Profil
Bohužial nefunguje to ani takto, mňa by zaujímalo či sú správne nastavené direktívy resp. či mi tam niečo nechýba.
kletely
Profil
vlado123
Skús len to to:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ ?q=$1
vlado123
Profil
Pravidlá budú napísané dobre, už sa mi to podarilo sprevádzkovať, ale funguje to len na localhost na virtual hostoch to nefunguje.

<Directory "/var/www/html">

# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.

Options -Indexes FollowSymLinks MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes

AllowOverride All

# Controls who can get stuff from this server.
Order allow,deny
Allow from all

</Directory>

Virtuálny server je nastavený nasledovne:

NameVirtualHost 127.0.100.1:80
<VirtualHost 127.0.100.1:80>
ServerName korma
DocumentRoot /var/www/weby/korma/html

<Directory "/var/www/weby/korma/html">


# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.

Options -Indexes FollowSymLinks MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes

AllowOverride All

# Controls who can get stuff from this server.
Order allow,deny
Allow from all

</Directory>

<IfModule mod_include.c>
<IfModule mod_dir.c>
DirectoryIndex index.shtml index.html index.htm index.php index.phtml
</IfModule>
</IfModule>

<IfModule mod_dir.c>
DirectoryIndex index.html index.html.var index.cgi index.pl index.htm Default.htm default.htm index.xml index.php
</IfModule>

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>


</VirtualHost>

Keď je nastavené AllowOverride na All tak mi vyhadzuje chybu 403.

Naozaj si už neviem rady.
vlado123
Profil
Problém som už vyriešil bližšie tu http://diskuse.jakpsatweb.cz/index.php?action=vthread&forum=3&topic=81 195

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: