solution?
I'm using:
php: 8.3
AbanteCart: v.1.4.0
I removed the old .htaccess file as showing and created new one as next here:
# 1. To use URL Aliases you need to be running apache with mod_rewrite enabled.
# 2. In your abantecart main directory rename file htaccess.txt to .htaccess
# 3. Edit file .htaccess. If abantecart is installed in yourdomain/ subfolder change configuration line RewriteBase / to RewriteBase /subfolder/.
# Example: yourdomain.com/store use RewriteBase /store/
# Important to have / at the end of the line.
# 4. if htaccess and mode_rewrite still does not works - check and set apache2 webserver directive AllowOverride All for your virtual hosts
# For any support issues please visit:
http://forum.abantecart.comOptions +FollowSymlinks
# Enable mod_rewrite if available
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Prevent Directory Listing
Options -Indexes
# Prevent Direct Access to TPL Files
<FilesMatch "\.tpl">
Order deny,allow
Deny from all
</FilesMatch>
# Disallow Specific Bots
SetEnvIf User-Agent "Googlebot" dontlog
SetEnvIf User-Agent "Bingbot" dontlog
SetEnvIf User-Agent "Slurp" dontlog
CustomLog /dev/null common env=dontlog
# Rewrite section for Retina images based on cookie
RewriteCond %{HTTP_COOKIE} HTTP_IS_RETINA [NC]
RewriteCond %{REQUEST_FILENAME} !@2x
RewriteRule ^(.*)\.(gif|jpg|jpeg|png|webp)$ $1@2x.$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)@2x\.(gif|jpg|jpeg|png|webp)$ $1.$2
# Ensure Admin Panel URL does not include /om.tr
RewriteCond %{REQUEST_URI} ^/om.tr/admin
RewriteRule ^om\.tr/admin/?(.*)$ /admin/$1 [L,R=301]
# Prevent URL with /om.tr at the beginning
RewriteCond %{REQUEST_URI} ^/om.tr
RewriteRule ^om\.tr/?(.*)$ /$1 [L,R=301]
# SEO URL Settings - Ensure clean URLs for AbanteCart
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
# Redirect directly to the login page if needed
RewriteCond %{REQUEST_URI} ^/admin/?$
RewriteRule ^admin/?$ /index.php?rt=index/login&s=virtualadmin [L,R=301]
</IfModule>
# SITE PERFORMANCE TUNING #
# Enable Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/woff2
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
</IfModule>
# Leverage Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/webp "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
<IfModule mod_headers.c>
Header set Connection keep-alive
<FilesMatch "\.(ico|jpg|jpeg|png|gif|css|swf|webp)$">
Header set Cache-Control "max-age=2678400, public"
</FilesMatch>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</FilesMatch>
<FilesMatch "\.(pdf)$">
Header set Cache-Control "max-age=86400, public"
</FilesMatch>
<FilesMatch "\.(js)$">
Header set Cache-Control "max-age=2678400, private"
</FilesMatch>
</IfModule>
# Redirect requests to robots.txt
RewriteRule ^robots\.txt$ /path/to/robots.txt [L]
after restoring my files through FTP App. to subdomain.mywep.tr now the webpage working fine but on webpage and admin page in the URL automatically added /om.tr on
www.subdomain.mywep.tr and become like this:
www.subdomain.mywep.tr/om.trto solve this i added next code to .htaccess:
# Ensure Admin Panel URL does not include /om.tr
RewriteCond %{REQUEST_URI} ^/om.tr/admin
RewriteRule ^om\.tr/admin/?(.*)$ /admin/$1 [L,R=301]
# Prevent URL with /om.tr at the beginning
RewriteCond %{REQUEST_URI} ^/om.tr
RewriteRule ^om\.tr/?(.*)$ /$1 [L,R=301]
on webpage now looking fine but on admin panel page i cannot access although every thing is correct and there is no error logs.what shall i do?