Jump to content

[SOLVED] htaccess not all modules supported


joeck
 Share

Recommended Posts

Hi Guys,

I'm trying to do my first migration to the customers existing server (IIS 10) . I ran the site as a subdirectory on my website for test purposes (everything works fine).
Following the tutorial of Joss, I tryed the site on a local xampp server to make sure, it also works on a root directory. So far so good, everything works.

Now I moved the files (from the xampp) to the customers server. The root/index page is shown but for every subpage i get 404 Errors...

Hence I followed the troubleshooting guide for not working URLs:

On the first sight, the .htaccess file is not recognized, therefore I contacted the host support. They said, it is recognized but not all modules are supported in the processwire .htaccess file. I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error.... BUT the rewrite rule from the hosts support, to proof the file is read, DID work... The support claims, they do not provide debugging... so basically the .htaccess file is recognized and working, but not throwing any errors (for whatever reason).

Working rewrite rule (from support):

RewriteEngine On
 RewriteBase /
 RewriteRule ^test\.asp$ index.html [NC,L]
 RewriteRule ^test\.html$ konzept.html [NC,L]
 RewriteRule ^test2\.html$ team.html [NC,L]

The support said, a couple modules are not supported in the htaccess file, the supported ones are listed here: http://www.helicontech.com/ape/ (I think mod_rewrite is supported)

As I do not completely understand what exactly is happening in the htaccess file, I'm stuck. I tried all suggestions I found regarding this topic on the forum, but none of them solved the problem.

 

.htaccess.txt

Link to comment
Share on other sites

Quote

The root/index page is shown but for every subpage i get 404 Errors...

That´s a classical problem. Is your site in the root or in a subdirectory ?
Did you check Allow/Override is configured on your hosting ?
Is your processwire config still pointing to localhost ?
Set debug mode on in your config file. $config->debug = true; to see any error messages.

 

 

  • Like 1
Link to comment
Share on other sites

Quote

Is your site in the root or in a subdirectory ?

It is in the root directory

4 hours ago, pwired said:

Did you check Allow/Override is configured on your hosting ?

No, I'm awaiting an answer from support. But I think it is configured, as the rewrite rules are working (see attachement).

$config->debug is set to true, but this is not helping as the server is displaying its own 404 Error page, hence I do not see if the config is still pointing to localhost.
I tried to change the servers 404 error page to the /index.php (as in the htaccess file) but this just gave me the index.php page, no matter which link is clicked.

PS: the CSS and some modules CSS are not linked properly as well, maybe this helps in finding the error

 

.htaccess.txt

Link to comment
Share on other sites

13 hours ago, joelplambeck said:

I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error...

Hmm, that means .htaccess file is not working. What happens if you remove the rewrite rules provided by your support? What errors are shown? Apache logs, what do they say?

  • Like 1
Link to comment
Share on other sites

The $config->httpHosts is set to the root of the customers website (with and without www.*)

1 hour ago, kongondo said:

Hmm, that means .htaccess file is not working. What happens if you remove the rewrite rules provided by your support? What errors are shown? Apache logs, what do they say?

The logs I found do not state a request to the htaccess file... and I still don't get an error with 'asölkdfjasldfj' on first line... As if the server doesn't even care... :-(

In the attachement you find logs with both version of the htaccess file (with and without the 'laksjdföadsf' error)

log.txt

Link to comment
Share on other sites

1 hour ago, kongondo said:

OK. But what error do you get in the browser when you remove your supports rules (i.e., using PW .htaccess file as is).. Do you get a 500 Error or 404 Error?

I get the exact same error (404 on subpages, index.php is working)

The rules added from the support are not helping me (for the migration) in any way, they simply prove that the htacces file is working/read (somehow).

To be specific: the rules are regarding the old site and simply rewrite a not existing url to an existing url  */test.html to */angebot.html (from the old website/structure). But the new website built with PW has a different (more organised) structure.

I hope my explanation is not too confusing :undecided:

Link to comment
Share on other sites

You have a backup of your website and database, right ? So, delete everything in the root and database of your Host and then do a fresh new processwire installation. That will tell you if your Host has any restrictions yes or no. As soon as you can do a fresh new processwire installation on your host, you can compare both the .htaccess and the config.php files with the ones you have in your website backup.

  • Like 2
Link to comment
Share on other sites

19 hours ago, joelplambeck said:

I get the exact same error (404 on subpages, index.php is working)

OK. However, index.php will work even without .htaccess. 

19 hours ago, joelplambeck said:

The rules added from the support are not helping me (for the migration) in any way, they simply prove that the htacces file is working/read (somehow).

This is what I am confused about. If the .htaccess file is working, you should have seen a server 500 error when you added random gibberish text at the very top of the htaccess file. If you didn't, it means the htaccess is not getting read. Maybe repeat the test to confirm?

Could these posts be of help to you?

 

  • Like 1
Link to comment
Share on other sites

  • joeck changed the title to [SOLVED] htaccess not all modules supported

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...