Autor Zpráva
Daviart
Profil
Aho,
níže uvádím kód který používám pro přepis url, ten funguje v pořádku, ale narazil jsem. Když my fyzicky složka existuje a chtěl bych ji zobrazit přímou cestou, provede se přepis taky. Potřeboval bych, aby mi složky které existují nezahrnul do podmínky pro přepis.

V .httacess moc zběhlý nejsem.


# .html
RewriteRule ^([^/]+).html /?str=$1
RewriteRule ^([^/]+)/([^/]+).html /?str=$1&str2=$2

# rewrite pro url
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ ?str=$1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)?/?$ ?str=$1&str2=$2
Daviart
Profil
# .html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+).html /?str=$1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+).html /?str=$1&str2=$2

# rewrite pro url
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ ?str=$1

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


Již opraveno

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

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

0