Home .htaccess redirect '/news' and '/news/../..'
Reply: 0

.htaccess redirect '/news' and '/news/../..'

user486
1#
user486 Published in May 20, 2018, 11:55 am

I'm trying to redirect '/news' and any URL that starts with '/news/...'. The idea is that a URL can either by /news (the whole list), /news/category (news list within 'category') etc. etc.

The longer URLs work, but '/news' bypasses my first redirect rule and hits the second. I'm not great with PHP or .htaccess so any help would be greatly appreciated.

RewriteRule ^/?news([^\.]+)$ /news.php [L]
RewriteRule ^([^\.]+)$ /page.php [L]
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30905 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO