MPeter Posted October 30, 2010 Share Posted October 30, 2010 Dear PHP Freaks, here my running code which does fine for now: Options +FollowSymLinks RewriteEngine on RewriteRule ^([^/]+)$ index.php?q=$1 [QSA] But it is ment to be a virtual folder instead of what it does to be a virtual file! Second, it has a problem that it does submit q= two times when you look at the $_SERVER['QUERY_STRING'] - e. g.: QUERY_STRING: q=index.php&q=Y-m-d And I do not get it why. Still, debugging it shows that the code does run fine: root@ubuntu:/tmp# more rewrite.log 127.0.0.1 - - [28/Oct/2010:19:16:56 --0700] [localhost/sid#218d7c58][rid#21a95400/initial] (3) [perdir /var/www/] strip per-dir prefix: /var/www/index.php -> index.php 127.0.0.1 - - [28/Oct/2010:19:16:56 --0700] [localhost/sid#218d7c58][rid#21a95400/initial] (3) [perdir /var/www/] applying pattern '^([^/]+)$' to uri 'index.php' 127.0.0.1 - - [28/Oct/2010:19:16:56 --0700] [localhost/sid#218d7c58][rid#21a95400/initial] (2) [perdir /var/www/] rewrite 'index.php' -> 'index.php?q=index.php' 127.0.0.1 - - [28/Oct/2010:19:16:56 --0700] [localhost/sid#218d7c58][rid#21a95400/initial] (3) split uri=index.php?q=index.php -> uri=index.php, args=q=index.php&q=100 127.0.0.1 - - [28/Oct/2010:19:16:56 --0700] [localhost/sid#218d7c58][rid#21a95400/initial] (3) [perdir /var/www/] add per-dir prefix: index.php -> /var/www/index.php 127.0.0.1 - - [28/Oct/2010:19:16:56 --0700] [localhost/sid#218d7c58][rid#21a95400/initial] (1) [perdir /var/www/] initial URL equal rewritten URL: /var/www/index.php [iGNORING REWRITE] As you see this coding above badly needs optimiziation. I hope I did describe the two problems to the best as possible, and that you can help me out without pointing me into cheatseets or the official httpd site. I got a few through already, and that is the result of them - *smile* Big thank you. Regards, MPeter (New PHP Freak User) Link to comment https://forums.phpfreaks.com/topic/217292-virtual-folder-problem-slash-is-missing-cough-its-a-virtual-file-now/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.