Lord Posted January 25, 2011 Report Share Posted January 25, 2011 Sveiki! Vēlos samainīt savus .php ekstenšenus pret "/" vai tos vienkārši noņemt. Pilnībā noņemt ir izdevies(t.i., caur website.com/index ieiet var), taču, verot vaļā website.com/index/ lapa meklē pēc index.php.php, kura, protams, nav. Kur varētu būt kļūda? RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^(.*)/$ $1.php Quote Link to comment Share on other sites More sharing options...
briedis Posted January 25, 2011 Report Share Posted January 25, 2011 (edited) RewriteRule ^(.*)/$ $1.php [L] RewriteRule ^(.*)$ $1.php [L] Ieteiktu kārtot dilstošā secībā, jo (.*) ietver gan /index, gan /index/, bet (.*)/ ietver tikai /index/ Edited January 25, 2011 by briedis Quote Link to comment Share on other sites More sharing options...
Lord Posted January 25, 2011 Author Report Share Posted January 25, 2011 RewriteRule ^(.*)/$ $1.php [L] RewriteRule ^(.*)$ $1.php [L] Ieteiktu kārtot dilstošā secībā, jo (.*) ietver gan /index, gan /index/, bet (.*)/ ietver tikai /index/ RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)/$ $1.php [L] RewriteRule ^(.*)$ $1.php [L] Rakstot šādi, man lapa vienkārši izmet 500. error. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)/$ $1.php [L] Šādā veidā man strādā website.com/index, bet uz website.com/index/ met, ka "No input file specified. ". Es kaut ko rakstu nepareizi? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.