Jump to content
php.lv forumi

mode rewrite


ziedinjsh

Recommended Posts

Divaini, bet ir tāda lieta.. šādi man izskatās tas viss:

Options +FollowSymLinks
RewriteEngine on

RewriteRule ^product/([0-9])$ /view.php?w=product&id=$1
RewriteRule ^theme/([0-9])$ /view.php?w=theme&id=$1
RewriteRule ^interesting/([0-9])$ /view.php?w=i&id=$1
RewriteRule ^music/([0-9])$ /view.php?w=music&id=$1

RewriteRule ^music /music.php
RewriteRule ^interesting /interesting.php

 

it kā viss strādā, bet tagad pievienojot jaunus datus.. kuram vajadzētu strādāt šādi: product/13 un product/14 parāda 

 404 Not Found

The resource requested could not be found on this server

 

bet kas ir vecāki ieraksti tie strādā šādā vaidā! Un ja iet šādi view.php?w=product&id=13 tad ar strādā

Kas tur pa vainu?

Edited by ziedinjsh
Link to comment
Share on other sites

Šāda veida tēma ir aprunāta manuprāt "dahuja" reizes, tā vietā, lai rakstītu teju gandrīz vienu un to pašu, tu varētu pameklēt forumā atbildes.

Gandrīz 700 ieraksti forumā, bet neesi tā lāga neko iemācijies?

 

Lūk jau būtu labs sākums, kaut kādiem pavedieniem:

 

http://php.lv/f/topic/20074-htaccess/?hl=%2Bmod+%2Brewrite#entry156402

Edited by Kemito
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...