Well i have this code into my .htaccess file

  Options +FollowSymlinks
    RewriteEngine on

    AddDefaultCharset UTF-8
    RewriteCond %{THE_REQUEST} ^[A-Z]+\ (.+)\.php  [NC]
    RewriteCond %{THE_REQUEST} !/?admincp/?((.)|(\.)*)
    RewriteRule [^/php/error\.php] /php/error.php  [L,NS]

    # Otherwise check if root request and rewrite to /php/index.php
    RewriteRule ^(/?)$ /php/index.php  [L,NS]
    RewriteCond %{THE_REQUEST} !\.php$  [NC]
    RewriteCond %{REQUEST_URI} !/?admincp/?((.)|(\.)*)
    RewriteRule ^([a-z|_]+)/?$ /php/index.php?categorie=$1 [L,NC,NS]
    RewriteCond %{THE_REQUEST} !\.php$  [NC]
    RewriteCond %{REQUEST_URI} !/?admincp/?(.*)
    RewriteRule ^([a-z|_]+)/([a-z|_|0|1|2|3|4|5|6|7|8|9]+)/?$ /php/index.php?categorie=$1&subcategorie=$2 [L,NC,NS]
    RewriteCond %{REQUEST_URI} !/?admincp/?(.*)
    RewriteCond %{THE_REQUEST} !\.php$  [NC]
    RewriteRule ^([a-z|_]+)/([a-z|_|0|1|2|3|4|5|6|7|8|9]+)/([^/]+)\.html$ /php/index.php?categorie=$1&subcategorie=$2&article=$3 [L,NC,NS]
    ErrorDocument 404 /php/index.php?categorie=apps&subcategorie=error404

I am trying to change line 6 to this:

  RewriteRule [^/php/index\.php\?categorie=apps&subcategorie=error404] /php/index.php?categorie=apps&subcategorie=error404  [L,NS]

but it doesn't work.. When i type http://localhost/php/index.php i see this page, but i don't want to see this page..I want to see http://localhost/php/index.php?categorie=apps&subcategorie=error404

Any help?

link|improve this question
This should be line 7 if you are counting blank lines! Is that right? – Khaled Jan 2 at 15:13
@Khaled yes!!of course – user726730 Jan 2 at 15:20
Any advice guys? – user726730 Jan 2 at 15:33
feedback

1 Answer

I think the rule should be:

RewriteRule !/php/index\.php\?categorie=apps&subcategorie=error404  /php/index.php?categorie=apps&subcategorie=error404  [L,NS]

The pattern [^...] means any single character except the ones listed after ^. The ! means negate the entire pattern.

link|improve this answer
Internal Server Error thx for the response – user726730 Jan 2 at 17:07
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.