Jump to content

Recommended Posts

Site Structure

htdocs/ or www/ or public_html/
    |
    | ==> frontend/
    | 	    |
    |       | ==> pages/
    |       | ==> templates/
    |       | ==> templates_c/
    |       | ==> index.php
    |           
    | ==> backend/
    | 	    |
    |       | ==> pages/
    |       | ==> templates/
    |       | ==> templates_c/
    |       | ==> index.php
    |
    | ==> ajax/   
    | ==> cron/
    | ==> files/
    | ==> includes/
    | ==> install/
    | ==> languages/
    | ==> .htaccess

I want to access frontend directory when url is www.site.com not www.site.com/frontend

I don't see why you don't place these files into the root directory

 

| | ==> pages/
| | ==> templates/
| | ==> templates_c/
| | ==> index.php

 

Anyway, make sure mod_rewrite is enabled on the server. Restart apache after making the changes.

 

In .htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^frontend/(.*)$ /$1 [R=301,NC,L]
Edited by QuickOldCar

You can also change the 'root' folder for your site. Not knowing what you are using for hosting, I can't give you specific instructions. But, if you are with a host, they should have the ability to configure your domain. Just point the domain to the frontend folder (I assume that none of the files in the backend folder need to be directly accessible via a browser). If you do this, then frontend/ will be the root for your domain and no one would be able to directly access files in backend/

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.