htaccess - How to ignore folder in site root while accessing a URL

I have a folder in my site's public_html directory called connect. The folder is causing the page sitenameconnect

I have a folder in my site's public_html directory called /connect. The folder is causing the page sitename/connect to access a parent index page instead of the Wordpress page set up.

Deleting this folder solves the problem, but this folder keeps getting added daily by my autoSSL program. It was due to a connect.sitename subdomain being set up, but even after removing that from the DNS, it is still being added daily.

Is there anything that I can do to the htaccess file, or anything else to ignore that folder and use the Wordpress page I've set up?

There is no way that I can change the URL, the client has sent out print media with the URL on it.

I have a folder in my site's public_html directory called /connect. The folder is causing the page sitename/connect to access a parent index page instead of the Wordpress page set up.

Deleting this folder solves the problem, but this folder keeps getting added daily by my autoSSL program. It was due to a connect.sitename subdomain being set up, but even after removing that from the DNS, it is still being added daily.

Is there anything that I can do to the htaccess file, or anything else to ignore that folder and use the Wordpress page I've set up?

There is no way that I can change the URL, the client has sent out print media with the URL on it.

Share Improve this question asked Jan 14, 2020 at 19:56 Paul ElrichPaul Elrich 1006 bronze badges 3
  • You can move all files related to your Wordpress website to an other folder and edit the domain settings pointing to the new folder. – Luckyfella Commented Jan 14, 2020 at 20:02
  • Just did that following this guide, but it didn't solve the issue. Site is still reachable, but the /connect page is still being overwritten with the folder in the public_html directory – Paul Elrich Commented Jan 14, 2020 at 20:11
  • The new folder should not be nested in any way inside the connect folder. If you edit the domain settings in your hosting panel to the new folder you can‘t still have the same issue. – Luckyfella Commented Jan 14, 2020 at 20:18
Add a comment  | 

1 Answer 1

Reset to default 1

Ordinarily, requests for physical directories (and files) are not routed to WordPress. You could make an exception for this one folder (or URL) and specifically rewrite requests for /connect to index.php (the WordPress front-controller).

Try the following before the # BEGIN WordPress section:

# Override directory
RewriteRule ^connect index.php [L]

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744836205a4596274.html

相关推荐

  • htaccess - How to ignore folder in site root while accessing a URL

    I have a folder in my site's public_html directory called connect. The folder is causing the page sitenameconnect

    2天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信