JasonSc
BuSo Pro
- Joined
- Mar 30, 2016
- Messages
- 109
- Likes
- 144
- Degree
- 1
htaccess redirect with regex
Long story but I'm "inherited" a legacy site which is being migrated over to wordpress.
Currently most of the pages end with a ".shtml". I have kept the slugs the same, but they end with the "/" not ".shtml"
Using Regex, how do a I create a 301 redirect rule to have the ".shtml" to redirect to the "/"
example:
old url: abc.com/phone.shtml
new url: abc.com/phone/
There are a little over 200 pages and I don't want to create a line by 301 redirect.
Oh and one more. I want to change the blog slug. Currently its blog/year/date/title.shtml
old: abc.com/blog/2016/10/title.shtml
new: abc.com/blog/title/
Long story but I'm "inherited" a legacy site which is being migrated over to wordpress.
Currently most of the pages end with a ".shtml". I have kept the slugs the same, but they end with the "/" not ".shtml"
Using Regex, how do a I create a 301 redirect rule to have the ".shtml" to redirect to the "/"
example:
old url: abc.com/phone.shtml
new url: abc.com/phone/
There are a little over 200 pages and I don't want to create a line by 301 redirect.
Oh and one more. I want to change the blog slug. Currently its blog/year/date/title.shtml
old: abc.com/blog/2016/10/title.shtml
new: abc.com/blog/title/
Last edited: