I want to configure Magento site inside sub folder but parent folder also have Magento site.
For example:
app/
skin/
media/
js/
beta/
.../
.../
I want to configure Magento inside beta folder but due to parent magneto .htaccess, beta URL doesn't work. Only home page loads but further links are not working.
here is my site URL
http://tradeplumbing.co.uk/
and
http://tradeplumbing.co.uk/beta (only home page work If click on any link this redirect to main site)
Have you modified the paths in the core_config_data table?
You need to change web/unsecure/base_url and web/secure/base_url to be you new path with a trailing /.
If you have multiple stores you will need to modify them too.
Also if you have full paths in the database for the templates, JS and CSS files, rather than relative paths, you will need to modify these database fields in core_config_data too:
web/unsecure/base_skin_url
web/unsecure/base_media_url
web/unsecure/base_js_url
Once all that is done you will need to delete the cache (/var/cache) and any session files (/var/session) files to force the files to be regenerated.
Related
I have the following file structure on my server
/var/laravelapp -> this is the entire laravel project.
/var/www/html/eduapp - > this is the public_html folder which has a folder called eduapp with the public contents of laravelapp.
The login register and home page work
https://example.com/eduapp/
when i click on the other buttons in the homepage the url becomes https://example.com/routename therefore giving an error
if we manually add eduapp in the link eg. https://example.com/eduapp/routename it works!!
any suggestions or solutions?
so these are the things that made the app work
Changed APP_URL to example.com/eduapp.
Changed back button hrefs to href='../routename'.
Created Symlinks for public/img and storage folders.
Removed Slash from href routes.
First of all. I haven't got any knowledge about Symfony. I just have to do a few modifications to an existing site quick and dirty. Now here is the case.
I need to "bypass" the Symfony framework to access static content in a folder e.g. (domain.com/folder).
This folder contains index.html and all the needed images, css, js etc. It also contains sub pages like (domain.com/folder/sub.html, domain.com/folder/sub2.html etc.). These sub pages are accessible thourgh domain.com/folder/index.html.
How can I do this?
SOLVED: (by user3749178)
Put you folder under /web. And a note for anyone else -> you also have to reference the file name.
domain.com/folder/ -> does not work
domain.com/folder/index.php -> works
Put you folder under /web. Everything what is in your /web directory is visible via http.
I have enabled multistore option enabled in my prestashop website. I also setup a store named 'abc' and set its url 'http://example.com/abc'. My site home page is runnig well but when I go to my store url 'http://example.com/abc' it does not load properly due to it couldn't found all js and css file in head tag and it is showing 404 not found for all css and js file in consol.
What can be the problem there.? Thanks for advance help.
Open vim config/settings.inc.php from config folder
Locate the line that contains the __PS_BASE_URI__ setting, and then update the value with the base URI.
If you installed PrestaShop in the document root directory
(for example, public_html),
then the base URI is /. Alternatively, if you installed PrestaShop
in a subdirectory,
the base URI is /path, where path represents the folder name.
For example, the following line shows
the base URI set to the document root directory (/):
define('__PS_BASE_URI__', '/');
for subdirectory - define('__PS_BASE_URI__', '/directoryname');
Save Changes.
Check this url for more information : http://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/prestashop2/changing-the-prestashop-url-settings
I have made a website (WP based) and put every stuff inside the /site folder.
I did that, thinking of creating "custom" systems, and putting each one inside a folder, so for example: /promo would go to something else than the website...
But, I have tried with both .htaccess redirect and PHP location redirect, and when I try to "share" the website, without it's /site folder included, Facebook doesen't detect's the site meta...
Also, is it a problem for google, to use redirect's when accessing the website without the /site WP home folder? I mean, a guy comming from a www.onesite.com would have it's "referer" header as onesite, or mysite?
Thanks
I feel like you're creating your own problems. Just put WordPress in document root and don't bother with rewriting to a subdirectory. WordPress won't delete any custom files or folders when updating.
If you have some custom part that you want to reach through http://www.example.com/promo. Put it in the promo folder under the document root.
If want to reach the custom part through http://promo.example.com, just create new virtual host.
I am attempting to create a website utilizing PHP as the driving power behind the gears. The idea behind the site (generally) requires that each user be presented with the option of creating their own profile (currently considering creating a directory for each user).
I have been doing considerable research in order to set this application up in the best means possible. But I am suffering from extreme confusion when it comes to creating the directory structure. I am considering downloading a framework assistant (CodeIgniter) which might assist me in the venture, but I'd rather get the opinions of others first.
Currently I have all of my files and content within my public_html folder, and I am aware that this is not the ideal set-up. But I'm not sure how to go about creating an alternative structure. I do not know where to store the various templates (header.php, footer.php, etc) and how/where to call them.
I want to create pages to list the "About", "Contact Page", and other content, but do not know where these pages should be located? Do I save the content of these pages within the public_html directory and simply include the templates from the various subfolders?
Concerning a config.php file: I am attempting to have all of the necessary information pertaining to MySQL connections within a single file, as well as other necessary information to be included at the beginning of EACH page within the site.
Thoughts? I'm fairly new to the cloud, and so simple and basic responses would be greatly appreciated!
You're thinking of this wrong. You don't need a directory for each user. You can use GET params to have one script (profile.php, for example) pull the appropriate profile for a user dependent on data passed to it. For example, profile.php?userid=5212 would pull the profile for user 5212 ($_GET['userid'] would contain the user's id in this case). Passing nothing could easily default to pulling the profile for the currently logged in user.
You could also use mod_rewrite so that http://www.yoursitehere.com/profile/5212/ could do the same thing (look into routes in most PHP frameworks)
Your directory structure should suit you. If the site is simple enough you could get away with something simple like just
public_html/
css/
includes/
images/
js/
Your database configuration could live in public_html/includes/ and you could include it on any page requiring a database connection. Your about and contact pages can be actual files located in public_html/ to keep things simple. Again, these are just suggestions. Your directory structure should be whatever you need it to be.
Store everything in a structure that makes sense to you. Something like this should work:
public_html
-Includes
-images
-css
-blog
And so on...
regarding the config file, you can store in in the public_html directory, or in the includes directory
You might consider using a PHP Web Framework like Symfony. It will help with a lot of the basics so that you can concentrate on the Product features.
For the user profile, Store all there information in a database with user id as a field.
When the user logs on, run a query to select all the information by querying against there user id.
As for file structure, you could use:
public html
includes
header.html
footer.html
config.php
classes
pages (stores other pages besides index.php here, contact, about etc.)
css
JS
index.php/html
and outside of the public_html folder I have my mysqli.php file.
To include these header files in your index.php file you would simply create (in your includes folder or wherever you choose) a config.php file with something like the following :
require_once($server['document_root']."/classes/filename.php"); // include needed files and mysqli connection here as well
You could also set a custom error handler in the config file as well if required.
In your index.php file you would then call the config file (which would automatically include any files you specified in the config file as well) and your header and footer i.e
include('/includes/header.html');
include('/includes/config.php');
<!--ENTER PAGE CONTENT HERE-->
include('/includes/footer.html');