Forum
Removing www from runway site
Hi all,
I used to use the below code to rewrite www. to non www (www.example.co.uk to example.co.uk), but in Perch Runway, it is causing some issues whereby example.co.uk works but www.example.co.uk gets redirected to example.co.uk/perch/core/runway/start.php (which states Sorry, that page could not be found.).
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
RewriteRule (.*).xml(.*) $1.php$2 [nocase]
</IfModule>
Any ideas as to how I can achieve this in Runway? I figure it may have something to do with Routes?
Jon. Here is one of my htaccess. It works the same when runway rewrite is added. Maybe it will help you.
Thanks for replying Robert. I'll try this when I get back to my PC :-)
Thanks again Robert, yours probably would have worked had I removed the https aspect, but in the end I ended up using a segment of my original code as below which seems to do the trick.
Hi
I've used the
.htaccess
solution above, but it's logging me out of Perch Runway? .htacess rules are below.I've done a quick 12 second screencast to show the problem: https://youtu.be/jwSdgTqMUXY
Here's what happens:
The URL looks strange:
Here's my htaccess
Summary: