Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder olidenia's Avatar
    Join Date
    Oct 2009
    Location
    Sitting In Front Of A Screen
    Posts
    110
    Thanks
    16
    Thanked 4 Times in 4 Posts

    mod_rewrite working fine, just a question o two

    Hi to all!

    Begining to use mod_rewrite and loving it, I have a small/large bug, I need some help.

    My url's looked like this before: localhost/dnl/?lang=en&p=home

    And now they look like: localhost/dnl/en/home.php

    The problem is that i have functions called on the home page, for example localhost/dnl/?lang=en&p=home&edit=true and I could edit something but now localhost/dnl/en/home.php?edit=true is not working.

    I have a feeling i'm doing it wrong. but don't know where.
    This is my .htaccess file:
    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^([a-z]+)/([-a-z_]+).php /dnl/index.php?lang=$1&p=$2
    
    
    </IfModule>
    my url
    It's easy once you know how...

  • #2
    Regular Coder olidenia's Avatar
    Join Date
    Oct 2009
    Location
    Sitting In Front Of A Screen
    Posts
    110
    Thanks
    16
    Thanked 4 Times in 4 Posts
    I found, that this works fine:

    I added: [QSA,L] at the end and now localhost/dnl/en/home.php?edit=true works fine, the only thing, it would be cool to make it like this localhost/dnl/en/home.php,true


    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    
    RewriteRule ^([a-z]+)/([-a-z_]+).php /dnl/index.php?lang=$1&p=$2 [QSA,L]
    </IfModule>
    It's easy once you know how...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •