Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

how do i do this with htaccess ?

Comments

  • Registered Users Posts: 352 ✭✭fergalfrog


    I think this should probably be in development (rather than design)

    Your htaccess file should look like this:

    RewriteEngine On
    # Make it case insensitive
    RewriteRule ^rule$ ... [NC]
    RewriteRule ^(.*)@(.*)$ index.php?option=productquote&email=$1@$2

    I have tested it here and it works as expected - let me know how you go.


  • Registered Users Posts: 648 ✭✭✭ChicoMendez


    hi there

    thanks for that !


    how would i tweak it though so as
    (notice the /d )

    www.domain.com/d/james@james.com

    is redirected to

    http://www.domain.com/index.php?option&email=james@james.com

    thanks alot !


  • Registered Users Posts: 352 ✭✭fergalfrog


    Try this:

    RewriteEngine On
    # Make it case insensitive
    RewriteRule ^rule$ ... [NC]
    RewriteRule ^(.*)d/(.*)@(.*)$ index.php?option=productquote&email=$2@$3


  • Registered Users Posts: 648 ✭✭✭ChicoMendez


    hi,

    does not seem to be working - would it have anything to do with the stuff that was already in the htaccess file
    DirectoryIndex index.php
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
    RewriteRule (.*) index.php
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    
    
    
    
    ########## Begin - Rewrite rules to block out some common exploits
    ## If you experience problems on your site block out the operations listed below
    ## This attempts to block the most common type of exploit `attempts` to Joomla! 
    #                              
    # Block out any script trying to set a mosConfig value through the URL
    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    # Block out any script trying to base64_encode crap to send via URL
    RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
    # Block out any script that includes a <script> tag in URL
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Send all blocked request to homepage with 403 Forbidden error!
    RewriteRule ^(.*)$ index.php [F,L]
    # 
    ########## End - Rewrite rules to block out some common exploits
    


  • Registered Users Posts: 352 ✭✭fergalfrog


    I tested it and it works fine here so yes it may be as a result of the other rewrite rules.

    You may want to clear out the htaccess file and start adding lines back in to find out which line is conflicting.


  • Advertisement
Advertisement