I am working with my htaccess file to configure the layout of URLs on my site.
The problem at the moment is that I can no longer submit any forms.
I have two files that will definitely contain the same code (copy and rename). If I call page1.php, the URL will display as page1.php. Everything is working fine while I try to log in or cause some errors. Now when I call index.php(which has the same code!), It htaccesshides index.phpin the URL how it should do! But when I test the login script, nothing will happen when submitting the form. It just updates the site. So I don’t know why this is happening?
This behavior will be triggered initially by htaccessrewriting rules. I uninstalled htaccessand tried again. Without it, it works, but still has those ugly URLs.
Good to show that in htaccess:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)\.html$
RewriteRule ^.*\.html$ %1.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)/$ $1.php
AddType application/x-httpd-php .htm .html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^index\.(htm|html|php) http://www.domain.com/ [R=301,L]
RewriteRule ^(.*)/index\.(htm|html|php) http://www.domain.com/$1/ [R=301,L]
and the form will be sent using:
form action = "<?php echo $_SERVER['PHP_SELF']?>" method= "post"...
So, if there is someone who could help me, I would really appreciate it.
UPDATE:
To provide additional information that I like:
First of all, the structure is as follows: due to different languages, the root structure is similar:
www.domain.com/languagefolder/...
, www.domain.com, languagesubfolder. , , www.domain.com/languagesfolder/index.php , www.domain.com/languagesfolder/. . . www.domain.com/languagesfolder/index.php www.domain.com/languagesfolder/, .../index.php. .
, , .../page .../page.php, . , : , , SQL-, , .../page.php, .../page.html .../page.htm.