Trying to figure out how to rewrite the following in server.conf. Any help would be greatly appreciated. Have been at this for a couple hours now and can't seem to get it to work.
www.maindomain.com/##### from a url that looks like wwww.maindomain.com/?id=##### where # signs are numbers.
I have tried all types of scenario's. Here are some that I have tried
RewriteRule ^(.*)$ /?Id=$1{QUERY_STRING} [PT]
RewriteRule ^(.*/)$ /?Id=$1{QUERY_STRING} [PT]
RewriteRule ^(/.*)$ /?Id=$1{QUERY_STRING} [PT]
RewriteRule ^/(.*)$ /?Id=$1{QUERY_STRING} [PT]
This should work (not tested): Change index.php to your home page file.
RewriteRule ^/?([\d]+) index.php?Id=$1 [QSA,L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.