Click here to Skip to main content
15,067,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi 
I writing .htacess for website but add <pre>RewriteRule
and run web error
Internal Server Error


Convert link: touchme.vn/me?i=admin --> touchme.vn/me/admin

I sent systax:
RewriteEngine ON

RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
RewriteRule ^/me/([0-9a-zA-Z_-]+) /me?i=$1 [NC,L]
RewriteRule ^dev/(.*)$ https://touchme.vn/me$1 [L,R=301,NC]
RewriteRule ^touchme.vn/me/([0-9a-zA-Z_-]+) https://touchme.vn/me?i=$1 [NC,L]
#RewriteRule ^(.*)$ /me.php?/$1 [L]
RewriteRule ^([^/]*)$ /me.php?i=$1 [NC,L]


Apache 2.4
Please fix help me
Thank you

What I have tried:

Hi 
I writing .htacess for website but add <pre>RewriteRule
and run web error
Internal Server Error


Convert link: touchme.vn/me?i=admin --> touchme.vn/me/admin

I sent systax:
RewriteEngine ON

RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
RewriteRule ^/me/([0-9a-zA-Z_-]+) /me?i=$1 [NC,L]
RewriteRule ^dev/(.*)$ https://touchme.vn/me$1 [L,R=301,NC]
RewriteRule ^touchme.vn/me/([0-9a-zA-Z_-]+) https://touchme.vn/me?i=$1 [NC,L]
#RewriteRule ^(.*)$ /me.php?/$1 [L]
RewriteRule ^([^/]*)$ /me.php?i=$1 [NC,L]


Apache 2.4
Please fix help me
Thank you
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900