Joomla 1.5 main menu adding extra subdirectory - php

I am having trouble with my main menu in Joomla. I have the installation on a testing site in a subdirectory that I am accessing via ip address (ex. http://255.255.255.255/joomla)
For some reason all the menu links except for 'Home' add an extra subdirectory that isnt there. for example, I have 'contact' link, the menu links to http://255.255.255.255/joomla/joomla/menu-id-85.html which in turn links to 404.
Whats going on here? fyi I have the configuration file set to:
var $live_site = 'http://255.255.255.255/joomla';
the site is running on iis7 with several other successful joomla production sites running.
UPDATE: I have removed the $live_site variable and still no luck! any ideas would be helpful.

I think I know what your problem is. Try turning off SEF URLs and see if the links work. If so, you probably need to take a look at your HTACCESS file and change the RewriteBase or comment it out completely.

Related

Change Startup Page of a WordPress website

I have an installed WordPress website.
I'm working on the site, therefore, I want to show a constructor page for the internet user. I have created a page which called first.html and I change the .htaccess file like below
#Alternate default index page
DirectoryIndex first.html
Now when I enter my domain name on the browser I can see the first.html. This is working properly.
I'd like to see my changes by entering the domain and page name on the browser like
www.mydomain/index.php
or
www.mydomain/wp-content/themes/XXXTHEME/index.php
However, my theme pages don't work.
How can I achieve to do this?
Instead of making changes in .htaccess, I'd suggest you to use this plugin : https://wordpress.org/plugins/maintenance/
Simply name your html file "index.html"
Web servers most commonly parse the index.html file firstly (unless told otherwise) and if it is not found, it proceeds to index.php
This also allows you to simply change that ".html" part to ".php" to see the website you are working on, without installing plugins that clutter your database or making unnecessary changes to your .htaccess file.

How to change base url to subdirectory CakePHP?

I have a cakephp 3 script installed on my cpanel account.
this domain is the primary domain for account but i have relocated it to a subfolder for necessary reasons.
my htaccess rewrites it perfectly and every url works both with and without /subfolder/ in the url.
However, all the links in cakephp automatically append /subfolder/ back into the url.
I even tried manually replacing $base_url in configuration.php with 'mydomain.com'; only, but that didn't work. Then I replaced every instance in all the hundreds of files of $base_url with 'mydomain.com'; but still, nothing changed and it still shows that /subfolder/ in every url even when i access mydomain.com directly._
I need to get rid of this /subfolder/ in the url that cakephp is serving from php. i tried everything i knew but nothing works.
Please tell me how to solve this problem.
Have you tried setting App.base, App.webroot? Setting those values up will disable automatic directory detection and should help you get the URLs you want. See configuration docs for more on those values.

CodeIgniter routing - 404 error after moving to new server

At the moment I am trying to move a website to a new web server. The site uses CodeIgniter and on the old server, every route worked. On the new server none of them are working, even though I copied the entire website from the old server. This means there are no differences in .htaccess files, since the two servers contain the exact same website. Not even the default routes are working, just the home page (index.php). I included the code in .htaccess to remove 'index.php' from routed URLs, but that also does not work.
If I try to visit '1.1.1.1/~user/employees' it will give me a 404 error, which means that the CodeIgniter route is not working. The controller file is located at /application/controllers/employees.php, so I am not sure what causes the problem.
I am aware of the similar posts on the site here, but none of them could solve my problem. Configuration of the config/config.php is (partly) as follows:
$config['base_url'] = '1.1.1.1/~user';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
I have tried to change the base_url, but it still does not work if it's empty. Changing uri_protocol to REQUEST_URI or PATH_INFO also does not work. Also, if I try 1.1.1.1/~user/index.php/employees (so put 'index.php/' in between) I still cannot reach the page. I checked some Apache settings as well, AllowOverride is set to ALL and the mod_rewrite module is installed and enabled. Is there perhaps something else concerning differences in both server's configurations that I could have missed?
EDIT:
I think I am a bit closer to finding out what the problem is. It is either something with Apache or .htaccess (but I already tried many things) or it has to do with the fact that the server URL is 1.1.1.1/~user rather than 2.2.2.2 as it was on the old server. Maybe I should change the baseurl or location of my .htaccess? This looks similar to my problem, but moving the .htaccess did not fix the problem: Url routing errors in php in codeigniter. I might try re-installing Apache.
I think that you firstly should find out what happened.
All requests to CI go through index.php, so you just echo something and exit in index.php file at the first line.
If the page display what you echoed that means there is something wrong in CI, otherwise that's not because of CI. And you can focus on what cause the problem.
Sorry about my English.

Rewriting URLs in Joomla Component

I have a trouble in mod_rewrite redirect. I want to create friendly SEO links for my component. Now linkk looks like that:
http://www.mytestsite.com/index.php?option=com_mycomponent&task=show_posts&evid=11&Itemid=200&year=2013&month=10&day=15&title=this-is-really-test-article-here&uid=43840300d283724e77d5f33f19780f36&catids=15|16|17|18&filter_reset=1
I want to have:
http://www.mytestsite.com/posts/200-this-is-really-test-article-here
where first part of URL is itemid (200), and after article title.
How can i do that?
In Joomla, this is done in the administrator control panel by editing the site configuration (Site...Global Configuration). Click on the SEO tab and check the desired options, save and you're done.
If you need more options, try installing an SEO extension
Do make sure that you have a .htaccess file in the root of your web server home directory.
Also make sure that adequate file permissions are set, so that php/joomla can write to .htaccess and add mod_rewrite rules. I would recommend setting .htaccess file permission to 644. If that doesn't work, come back and ask again!
For Search Engine Keyword selection, this tutorial should be sufficient (skip to step 3): http://moz.com/blog/seo-your-joomla-website-in-11-super-easy-steps
A useful link to test if mod_rewrite is enabled on your webserver: http://docs.joomla.org/How_to_check_if_mod_rewrite_is_enabled_on_your_server

drupal rewrite is not working installed on subdomain

I have copied drupal from my main directory to anothre directory and created a sub domain but the url rewrite is not working.
I have checked mod_rewirte is enabled and allow override is set to all but I can not access pages except home page also I changed $base_url to point sub domain and also reflected in .htaccess.
Please advise what I can do from here also searched on net for this but nothing seems to be working
Thanks
If you cannot log in to turn off clean urls and you have access to the database you can edit the setting in the database.
in the 'variables' table find the row 'clean_urls' and delete the row. Then when the setting is checked it uses the default which is OFF.
In my experience this breaks when you move Drupal but miss the .htaccess file. Or if it is moved into a directory that forsome reason has AllowOverride turned off in apache settings.

Categories