Autor Zpráva
Hzahs8
Profil *
Zdravim,

skusam Mikeho mod_rewrite a super funguje, mam:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ ?page=$1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)?/?$ ?page=$1&arg1=$2

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)/([^/]+)?/?/?$ ?page=$1&arg1=$2&arg2=$3

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)?/?/?/?$ ?page=$1&arg1=$2&arg2=$3&arg3=$4


Len teraz by som chcel aby ked zadam bez lomitka na konci, aby ju presmerovalo trvalo s lomitkom:

www.domena.sk/page -> www.domena.sk/page/
www.domena.sk/page/page2 -> www.domena.sk/page/page2/
...


Da sa to? Poradite?


P.S.
RewriteCond %{REQUEST_URI} !.[[:alnum:]]+$
RewriteRule ^(.+[^/])$ /$1/ [R=301] 


Zevraj toto je na to, ale kde to tam mam dat, pretoze ked to dam na koniec tak to nefunguje.

Dakujem.
Paja
Profil
# ==== redirect to url with "/" at the end ==========================
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^([a-zA-Z0-9/=-]+)$ /$1/ [R]

zkus to dat pred
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ ?page=$1
Hzahs8
Profil *
Paja
dik, funguje.

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

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