Jump to content
php.lv forumi

kkas neizdodas ar mod_rewrite


Gustins

Recommended Posts

Labrīt :)

 

Nujau 2 dienas cenšos lēnām apgūt mod_rewrite, bet kautkas man nesanāk, kautgan googlē esu atradis itkā vienu precīzu piemēru, kurš man derētu, bet šams negrib strādāt :(

 

Tātad index lapā atverot kādu jaunumu attiecīgi tiek padots $id un pārmests uz linku http://domain.lv/articles.php?id=[id cipars]. Šo linku vēlos pārveidot piem. par http://domain.lv/articles/[cipars]/

 

.htaccess izskatās sekojošs:

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteRule ^articles/([0-9]+)/$ articles.php?id=$1 [NC,L]

 

Bet šitais variants kautkā nenostrādā un atveras tāpat tas standarta links - http://domain.lv/articles.php?id=[id cipars] :(

Pats mod_rewrite hostingam ir eneiblots un strādā, jo ar viselementārākajiem piemēriem viss strādāja

RewriteRule ^page_one.htm$ page_two.htm [L]

 

Ko es daru nepareizi?

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...