Htaccess file hosting


(Andrewbilham) #1

Good Evening,

I have moved hosting to 1 and 1 but bow have some issues with page redirection.

Previously the site worked fine. When i moved hosting i could access the home screen but no further pages.

The support amended my htaccess and i now have a functioning front end but for the backend i just get page does not exist in the front end.

It should work via www.webaddress.co.uk/backend

RewriteEngine on

# hide files and folders
RedirectMatch 404 /_protected
RedirectMatch 404 /\.git
RedirectMatch 404 /composer\.
RedirectMatch 404 /.bowerrc

# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

Any ideas?


(demonking) #2

I guess you use an advanced template.

The Problem I see, is that your Webroot points to frontend/web ,so your Server doesn’t know about backend/web.

Is it a dedicated Server or Shared Hosting?
If it’s shared hosting, i would be tricky… (wouldn’t suggest this one)

If it’s an dedicated

Another solution:

subdomains?

frontend:
webaddress.co.uk

backend:
backend.webaddress.co.uk


(Andrewbilham) #3

Thank you for your response.

I am using a similar template to this…

Subdomain i guess would mean a quite a few changes due to the way the application connects together.

Will read that link you put in as may help.

Always frustrating when it works on one server but not the next.


(demonking) #4

Was the server before also a shared hosting?


(Andrewbilham) #5

Yeah with godaddy


(Andrewbilham) #6

Its the RewriteBase / rule that seems to be required by this server which was never in before