0

I have hosted Joomla website in public_html folder and set User friendly URL for all sub menus in the website. For that I made a joomla admin settings and also kept .htaccess file to remove index.php [sample https://arsenalit.com/index.php/services/web-design-development ] in the url in the public_html folder to work. it is working : sample url : https://arsenalit.com/services/web-design-development .

Followed by I created Python application from cpanel called ait-tools. and wrote the flask app.py with two api urls, one is root / and another is /json.

Now when I try to execute this as

https://arsenalit.com/ait-tools - working https://arsenalit.com/ait-tools/json - NOT working

Key Points

  1. I have added .htaccess in the ait-tools folder - NOT WORKING
  2. I have modifed public_html/.htaccess file itself with different settings - NOT WORKING
  3. If i remove the .htaccess file, Now xxx/ait-tools/json is working but Joomla website user friendly not working.

PLEASE HELP ME, IT WILL HELP ME TO PROVIDE LOT OF FREE LIBRARIES TO OUR SOFTWARE COMMUNITY.

Reference URL

https://www.joomlart.com/tutorials/joomla-tutorials/joomla-4-tutorials-how-to-remove-index-php-from-urls

Python flask app routing in cpanel: can only access root url

Vijay .D.R
  • 11
  • 3

1 Answers1

0

I got to work by adding the below lines in .htaccess file.

## Begin - Python ! core SEF Section.
#
RewriteEngine on
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/ait-tools
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule ^http://%{HTTP_HOST}%{REQUEST_URI} [END,NE]
#RewriteRule . /ait-tools/ [L]

#
## End - Python ! core SEF Section.

Hope somebody will use of it.

Vijay .D.R
  • 11
  • 3