John Davidson

Custom, Non-php sub directory added to Wordpress page

0 comments
Message:


On the current site, we are attempting to add in a custom subdirectory on our Wordpress site that allows us to reference a 3rd party application. The code for this application is not written in php and isn't 'designed' for Wordpress.


Initially we added in a subdirectory and edited the .htaccess file to allow us to access the directory on our site, but it kept throwing a forbidden error. I spoke with our host (WPEngine) and they told us they no longer support .htaccess on their server and suggested that I parse the contents of the subdirectory to a page.


Does anyone know if this will even work if the contents of the custom subdirectory aren't php and there are a large quantity of files? Or is there another workaround that I'm not aware of?


For reference, here is the code written on the .htaccess file


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/jobs/(.*)$ [OR]
RewriteRule ^.*$ - [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress`


My Answer:
If your host does not support .htaccess and you are unable to directly access the custom subdirectory, you may need to consider alternative solutions. One option could be to create a custom page template in WordPress that includes the necessary code to display the content from the third-party application.

You could also look into using an iframe to embed the third-party application within a WordPress page. This would allow you to display the content from the custom subdirectory without directly accessing it.

Another option could be to use a plugin that allows you to include external content on your WordPress site. This could potentially provide a way to display the content from the custom subdirectory without directly accessing it.

It's important to consider the security implications of including external content on your site, especially if it is not written in PHP and is not designed for WordPress. Make sure to thoroughly review and test any solution you choose to ensure it meets your needs and maintains the security of your site.

Rate this post

5 of 5 based on 3500 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us