Help with .htaccess Rewrite

Discussion in 'Apache' started by FLOW-MATIC, Jan 24, 2011.

  1. #1
    Hello :)
    Looking for help with making a RewriteRule on .htaccess file to support URLs in different languages.

    for example:
    a real page: domain.com/pages/page.php
    can works as: domain.com/pages-page
    if want it to work in greek like:
    domain.com/σελίδες-σελίδα
    how can i make it work if a language other than English used...

    or.. if there is no solution for this...

    how to write a rewrite rule to work like this:
    real url: domain.com/10/5.php
    rewrite to: domain.com/10_σελίδες-10_σελίδα

    σελίδες = pages
    σελίδα = page

    anyone can help please?
    or at least any one know how to do it? :cool:
     
    FLOW-MATIC, Jan 24, 2011 IP
  2. mysqlxpert

    mysqlxpert Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Do you mean the URL in the browser domain.com/σελίδες-σελίδα will point to domain.com/pages/page.php?
     
    mysqlxpert, Jan 24, 2011 IP
  3. FLOW-MATIC

    FLOW-MATIC Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    yes...or at least url domain.com/10_σελίδες-10_σελίδα to point to domain.com/10/5.php - how to make rewrite-rules to work in other lang
     
    FLOW-MATIC, Jan 24, 2011 IP
  4. mysqlxpert

    mysqlxpert Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    Is 10 will always be there in the URL?
     
    mysqlxpert, Jan 24, 2011 IP
  5. FLOW-MATIC

    FLOW-MATIC Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #5
    no no... it means that if i use number as dir and number as filename how can i make it work like i asked..
     
    FLOW-MATIC, Jan 24, 2011 IP
  6. mysqlxpert

    mysqlxpert Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #6
    I believe the rewrite rule will remain the same for English and non-English (not tested) e.g.

    RewriteEngine On
    RewriteRule ^([0-9]+)_(+.)-([0-9]+)_(+.) $1/$3.php 
    Code (markup):
     
    mysqlxpert, Jan 24, 2011 IP