Miro

Miro
Wed, 23 Mar 2016 11:34:11 +1100

Ahoj, kedysi som tu nasiel navod ako spravit pekne URL a teraz by som potreboval, aby keby ktosi zada adresu s lomitkom, nech ho presmeruje cez 301 na bez lomitka, vies mi poradit? moj .htaccess vypada takto: # defaultny startovaci subor DirectoryIndex index.php index.html start.html RewriteEngine on Options +FollowSymlinks ####### Presmerovanie na verziu domény s www ###### RewriteCond %{HTTP_HOST} ^domena.sk RewriteRule (.*) http://www.domena.sk/$1 [R=301,QSA,L] ######## PEKNE URL ####http://mike.treba.cz/mod_rewrite-a-hezke-url-dil-ii/ RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/?$ ?arg1=$1 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/([^/]+)?/?$ ?arg1=$1&arg2=$2 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/([^/]+)/([^/]+)?/?/?$ ?arg1=$1&arg2=$2&arg3=$3 ### vynimky peknych url na adresare RewriteRule ^admin/.*$ - [PT]