Hi,
I’m using some fairly simple .htaccess to remove /index.php/ from my urls. This has worked fine for me until now.
But I also now want to do some 301 redirects for old site urls that existed. I’m having trouble combining the two. Here’s my .htaccess file:
RewriteEngine on
# Everything else to the EE controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php?/$1 [L]
# A bunch of redirects
Redirect 301 /rooms.php <a href="http://website.com/chambres/">http://website.com/chambres/</a>I’m going to need lots of redirects here, but I can’t get the first one working.
When I try to visit http://website.com/rooms.php I am brought to
http://website.com/chambres/?/rooms.php and don’t understand how it’s carrying the “rooms.php” across.
(The 301 on its own works fine if I remove the index.php rewrite.)
I had looked at other strategies for removing /index.php/ but I don’t think I can use them as I’m using a lot of pages and so have a lot of /page1/ /page2/ addresses, rather than /template/ as described in those approaches.
Any ideas? My understanding of .htaccess is pretty basic.