简体   繁体   中英

htaccess rewrite causing errors

I am using a PHP application I downloaded, and it is half working on my server, however I am having what I believe is a re-write error.

The application is a "job board" where people will be able to browse available positions, and apply online.

Currently it is "technically" working. A person can view the site, and postings, and they can fill out the application form. The message is sent properly.

The problem is that once the submit button is pressed the browser shows that the page is loading, but nothing ever loads. So the message is sent, but the following page is not loaded.

The application uses htaccess rewrites, and I believe this is where the problem is.

The application is supposed to work out-of-the-box on a top level domain, however I am trying to use it on a subdomain. Am I correct in assuming that technically there is not much difference when using a subdomain? After all, the pages all load fine until the form is submitted.

The application is running at http://volunteer.essentialtransit.com

What you see is the application after initially being set up, and I added one sample "job".

You can try applying to see the problem I am referring to. It is a very simple application form that only takes a few seconds to complete.

Here is the htaccess file:

# AddType x-mapp-php5 .php
# AddHandler x-mapp-php5 .php

RewriteEngine on
Options +FollowSymlinks

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

ErrorDocument 404 /page-unavailable/

<files ~ "\.tpl$">
order deny,allow
allow from none
deny from all
</files>

Perhaps if someone can explain what the htaccess rules are doing I can figure out the problem.

EDIT : So the page actually does load, but only after a very long time. The browser shows that the form is sent, and then following page starts to load, but then it takes minutes to actually load. All other pages on the site load quicker than that. The other strange things is that when a "job" page is initially opened it loads quick, after applying it just redirects back to the same "job" page, however this time it takes forever to load.

Rules are self explanatory:

RewriteEngine on # Enables rewrite engine (obviously)
Options +FollowSymlinks # Tells Apache to follow symbolic links

RewriteCond %{REQUEST_FILENAME} !-f # Here it redirects non-files
RewriteCond %{REQUEST_FILENAME} !-d # and non directories
RewriteRule . index.php [L]         # to index.php

ErrorDocument 404 /page-unavailable/ # Sets 404 page address

<files ~ "\.tpl$"> # Denies access to templates
order deny,allow
allow from none
deny from all
</files>

I doubt your issues have something to do with these rules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM