webserver - String after a Variable .htaccess -


i'm stucked in little problem:

i want make short link let user view images of user "test.test".

my code:

rewriterule ^(.*)\.(.*)$/images images.php?user-id=$1.$2 [qsa,l] 

example:

website.com/tester.tester/images           <== has end-result

full code here:

rewriteengine on    # turn on rewriting engine   rewriterule ^(login|settings|friends|gallery|logout|signup|administrator)/?$ $1.php [nc,l] rewriterule ^home/?$ profile.php?user-id=home [qsa,nc,l]  rewritecond %{request_filename} !-f   rewritecond $1 !^index [nc] rewriterule ^(.*)\.(.*)$ profile.php?user-id=$1.$2 [qsa,l]  # rewriterule ^([a-za-z0-9-\s]+)\.([a-za-z0-9-\s]+)$ profile.php?user-id=$1.$2 [qsa,l] #umlaute müssen gehen!! 

well tried best , hope work. i'm not happy that:

the updated code:

rewriteengine on    # turn on rewriting engine  rewriterule ^(login|settings|friends|gallery|logout|signup|administrator)/?$ $1.php [nc,l] rewriterule ^home/?$ profile.php?user-id=home [qsa,nc,l]  rewritecond %{request_filename} !-f rewritecond %{the_request} ^(.*)\.(.*)\/images [nc] rewriterule ^(.*)\.(.*)\/images$ images.php?user-id=$1.$2 [qsa,l]  rewritecond %{the_request} ^(.*)\.(.*)\/images\/ [nc] rewriterule ^(.*)\.(.*)\/images\/$ images.php?user-id=$1.$2 [qsa,l]  rewritecond %{the_request} !^(.*)\.(.*)\/images\/ [nc] rewritecond %{request_filename} !-f rewritecond $1 !^index [nc]  rewritecond %{the_request} ^(.*)\.(.*) [nc] rewriterule ^(.*)\.(.*)$ profile.php?user-id=$1.$2 [qsa,l]  rewritecond %{the_request} ^(.*)\.(.*)\/ [nc] rewriterule ^(.*)\.(.*)\/$ profile.php?user-id=$1.$2 [qsa,l] 

the result correct, if user types in "tester.tester/" wrong page loaded.

this annoying me. tried , little thing might solved php (i don't know)

thanks answers!! :d


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -