tonymacx86
Member
I'm in the process of setting up .htaccess RewriteRules for various parts of the site, both to redirect old vb4 URLs and also to preserve some custom parts of the site.
In VB, I was using a custom php file and rewriting to it for a more pleasing URL, e.g.
Rather than make a custom PHP file in XenForo, I created an addon to add custom content to a page instead. I made a new RewriteRule like this:
That doesn't work and results in a "Route this-looks-nice-for-august-2015.html/ could not be found." error. This, however, does work though it redirects to the URL whereas I'd prefer it to keep the more pleasing URL:
Thanks for any insight!
- adamsmasher
tonymacx86.com
In VB, I was using a custom php file and rewriting to it for a more pleasing URL, e.g.
RewriteRule ^this-looks-nice-for-august-([0-9]+).html?$ mycustompage.php?date=08-$1 [NC,L]
Rather than make a custom PHP file in XenForo, I created an addon to add custom content to a page instead. I made a new RewriteRule like this:
RewriteRule ^this-looks-nice-for-august-([0-9]+).html pages/mycustompage/?date=08-$1 [L]
That doesn't work and results in a "Route this-looks-nice-for-august-2015.html/ could not be found." error. This, however, does work though it redirects to the URL whereas I'd prefer it to keep the more pleasing URL:
RewriteRule ^this-looks-nice-for-august-([0-9]+).html pages/mycustompage/?date=08-$1 [R=301,L]
Thanks for any insight!
- adamsmasher
tonymacx86.com