#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0

    Exclamation Regex to match UTF-8 Characters (like ı, ş, ğ also) and Numbers and dash


    I need help for my question at this link at stackoverflow (also a coding forum)

    please combine 2 parts below since forum did not allowed me to create a link:
    stackoverflow dot com
    /questions/15927091/regex-to-match-utf-8-characters-like-i-s-g-also-and-numbers-and-dash

    note: I respect forum rules but I can not understand this rule. there is smthng like rel=nofollow, yeah?
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,121
    Rep Power
    9398
    Next time don't make us go to some other site in order to read your question. Many people just won't bother. Don't know what you're saying about some rule and rel=nofollow.

    Code:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^/?([^/]+)$ index.php?page=$1 [L]
    Don't even have to care about UTF-8 characters.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0

    Wink


    Thank you so much. Excuse me for my redirecting but my question was too long. And as I've said ı respect forum rules but, even a very famous master site's rule can be easily broken. so I'd let the people put their links. But as I've said, I respect. the perfect slogan of UEFA also. Again thank you very much. Lastly what does

    PHP Code:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond 
    %{REQUEST_FILENAME} !-
    mean in verbal form? I'am a desperate rookie for .htaccess commands. Apache docs are too much abstract to understand for me.
  6. #4
  7. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,121
    Rep Power
    9398
    RewriteCond is a condition attached to the following RewriteRule. The first argument is the string to test and the second argument is how to test it (typically a regex). %{REQUEST_FILENAME} is the name of the file that Apache looked for when trying to serve the request; -f is a test that the file exists and -d if it exists as a directory (with ! to negate).

    So those two conditions mean "only apply the following RewriteRule if the supposed file does not exist (neither as a file nor as a directory)".

IMN logo majestic logo threadwatch logo seochat tools logo