Jump to content
php.lv forumi

mod_rewrite


leisure

Recommended Posts

newaru saprast kur esmu ielaidis kluudu :(

 

.htaccess saturs:

RewriteEngine on

RewriteRule ^players/([0-9]*).html players.php?playerID=$1 [L,NC]

 

Neiet!!!, bet viss saak straadaat tikai tad, kad esmu reaali izveidojis mapi players! bet taa tachu tam newajadzeetu buut???

Link to comment
Share on other sites

Options FollowSymLinks

RewriteEngine on

RewriteCond !\.(css|js|jpg|gif|jpeg|avi|mp3) /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.htaccess$ - [F]

RewriteRule ^players/([0-9]*).html players.php?playerID=$1 [L,NC]

 

Ja neiet, varbūt pēdējo rindiņu mēģini pārrakstīt?

RewriteRule ^players/([0-9]*).html players.php?playerID=$1 [QSA,L]

 

nez... es šitādām lietām nemēdzu pārāk daudz laika tērēt ;)

Edited by Robis
Link to comment
Share on other sites

buutiibaa shitaa ir pirmaa reiza kad vinju izmantoju!!! takaa pat pilniibaa iespeejams ka esu aizmirsis kk svariigu.. bet nu newaru neko taadu atrast! (citaaas lapaas naw mod_rewrite! ) kk zem paste nav kaac iis piemeerinsh lai wareetu paarbaudiit wai iet man ???

Link to comment
Share on other sites

Man uz localhost, šķiet šitāds iet:

Options FollowSymLinks IncludesNoExec ExecCGI

RewriteEngine on

RewriteCond !\.(css|js|jpg|gif|jpeg|avi|mp3) /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.htaccess$ - [F]

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

Link to comment
Share on other sites

×
×
  • Create New...