Jump to content
php.lv forumi

mod_rewrite un urlencoded saites


malinens

Recommended Posts

Ceru, ka nerāsieties par to, ka jautājums nav par PHP ;)

 

problēma ir ar tādiem linkiem:

 

Daži portāli ir noindeksējuši /?name=test kā /%3Fname%3Dtest

 

un, ieejot caur tādu adresi, error_logā bļaustās par savvaļas karšu rakstzīmēm:

 

"GET /%3Fname%3Dtest HTTP/1.1" 403

(20025)The given path contained wildcard characters: access to /?name=test failed

 

Varbūt Jums ir gadījies sastapties ar kaut ko tādu? Kā to varētu novērst un redirektot uz /?name=test, lai lapa darbotos?

 

Paldies jau iepriekš!

Link to comment
Share on other sites


php_value include_path .:/home/chroot/websites/blahblah

php_flag magic_quotes_gpc Off

ErrorDocument 403 /a.php

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.(php|xml){1}$ /client/s.php [L]
RewriteRule ^sitemap-blahblah.(php|xml){1}$ /client/sitemap_blahblah.php [L]
RewriteRule ^blahblah1/?$ /client/blaaah.php [NC,L]


Tā kļūdu laikam tomēr tikai uz lokālā windowsīgā servera parādās, bet ezu testa/live serveriem viss ir bumbās. Izskatās, ka tā ir windows specifiska problēma...

RewriteRule ^blahblah1/kategorijas$ /client/blah2.php [NC,L]
RewriteRule ^blahblah1/(one|two|three)$ /client/blah3.php?category=$1 [NC,L]
RewriteRule ^blahblah1/(viens|divi)/(.*)$ /client/blah.php?category=$1&sub_category=$2 [NC,L]


RewriteRule ^blahblah4/([a-z]{1})/?$ /client/blah.php?alf=$1 [NC,L]
RewriteRule ^blahblah4/([^/.]+)/? /client/dd.php?i=$1 [NC,L]
RewriteRule ^blahblah5/?$ /client/cc.php [NC,L]
RewriteRule ^blahblah5/([a-z]{1})/?$ /client/bb.php?alf=$1 [NC,L]
RewriteRule ^blahblah5/([a-z]{1})/([0-9]+)/?$ /client/bb.php?alf=$1&page=$2 [NC,L]
RewriteRule ^blahblah5/([^/.]+)/? /client/pp.php?i=$1 [NC,L]


 

 

Tā laikam tomēr ir windows specifiska problēma, jo uz linuksveidīgajiem nav šīs problēmas...

Edited by malinens
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...