Forum Moderators: phranque
https://www.example.com/bboard/cgi-bin//ultimatebb.cgi?ubb=get_profile;u=00009498 https://www.example.com/ubbthreads/ubbthreads.php?ubb=showprofile&User=00009498 RewriteCond “%{REQUEST_URI}” “/bboard/cgi-bin/ultimatebb.cgi”
RewriteCond “%{QUERY_STRING}” “ubb=showprofile&User=(\d*)”
RewriteRule ^/bboard.*.cgi$ /ubbthreads/ubbthreads.php?ubb=showprofile&User=%1” [edited by: phranque at 9:18 pm (utc) on Jul 6, 2022]
[edit reason] Please Use example.com For Domain Names in Posts Apache Web Server forum [/edit]
For clarification, I should change this .htaccess rule.RewriteRule ^links/ /links.html [L,R=301]
to this if I move it to the conf file?RewriteRule /links/ /links.html [L,R=301]
RewriteRule ^/links/ https://www.example.com/links.html [L,R=301] Are conf rules always referenced from DocumentRoot?
the part of the URL after the hostname and port, and before the query string
the portion of the currently mapped filesystem path "below" where the rule is defined
RewriteRule /links/ /links.html [L,R=301] Redirect 301 /links/ https://www.example.com/links.html I confess that Apache docs are often too technical for me to understand, but I try my best.
when there are Redirect and RewriteRule directives in the same scope, the RewriteRule directives will run first, regardless of the order of appearance in the configuration file