Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Wrong URL but site works
 
Nautica
Sr. Member
 
Avatar
Total Posts:  140
Joined:  2008-01-03
 

I run several websites on same server in subfolders that are in the root of the server (public_html) and a .htaccess file in the root point to these folders for the domainname
Same i did with Magento and after adding de CGI workaround in CGI bin it worked.
But when i click on links i see URLs like this:

http://www.mywebsite.nl/mywebsite.nl/index.php/checkout/cart/

where it should only show

http://www.mywebsite.nl/index.php/checkout/cart/

This is my .htacces (it is the old .htacces of the previous version as the new .htacces of Magento ver. 0.7.14800 did not work)

<IfModule mod_php5.c>
    
php_flag magic_quotes_gpc off
    php_flag short_open_tag on
</IfModule>

Action php5-cgi /cgi-bin/php5-cgi 
AddHandler php5
-cgi .php

DirectoryIndex index
.php

RewriteEngine on

#RewriteBase /mywebsite.nl/

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_FILENAME} !-l

RewriteRule 
.* index.php

IAfter playing around a bit with the previous version i did a fresh install with a the new version Magento ver. 0.7.14800 but the old version had the same problem.

When installing i let the system determine the URls settings and they are like this:

Use relative paths in links:  NO
Js base url:  /js/
Media base url: /media/
Skin base url: /skin/
Upload files URL: /media/upload/

Default web url: cms
CMS Home Page: Home Page
Default no-route url: cms/index/noRoute
CMS No Route Page: 404 NOT FOUND1
Show breadcrumbs for CMS pages: Yes

Unsecure
Protocol: HTTP (Unsecure)
Host:  mywebsite.nl
Port 89
Base url /mywebsite.nl /

Secure
Protocol: HTTP (Unsecure)
Host:  mywebsite.nl
Port 89
Base url /mywebsite.nl /

Cookie management
Cookie Path: EMPTY
Cookie Lifetime: EMPTY
Cookie Domain: EMPTY

 
Magento Community Magento Community
Magento Community
Magento Community
 
kameko.rouge
Member
 
Total Posts:  58
Joined:  2007-10-11
 

shouldn’t your base urls be ‘/’ instead then?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nautica
Sr. Member
 
Avatar
Total Posts:  140
Joined:  2008-01-03
 

I tried a new clean install with version ver. 1.0.19870.2 and when trying to intall i type in my url in the browser e.g. http://www.mysite.eu and the install script changes the URL to: http://www.mysite.eu/mysite.eu/index.php/install/ ( note the dubble name mysite.eu)

My webserver has 3 folders with running websites and the htaccess in the root of the server is pointing to three different url’s
Like :
http://www.mysite.nl
http://www.mysite.com
Magento is running on http://www.mysite.eu in a folder named mysite.eu

On the other folders i run Joomla and Xtcommerce that do not show this problem of producing a wrong URL.

Don’t know if it is a bug in Magento not running in the serverroot or a wrong htaccess in my root.

This is my htaccess in the root

####ERROR_HEADER####
#ErrorDocument 400 
#ErrorDocument 401 
#ErrorDocument 402 
#ErrorDocument 403 
#ErrorDocument 404 
#ErrorDocument 500 
#ErrorDocument 501 
#ErrorDocument 502 
#ErrorDocument 503 
####ERROR_TAILER####

RewriteEngine On
#Rule-0
RewriteCond    %{HTTP_HOST}    ^www.mysite.nl$    
RewriteCond    %{REQUEST_URI}    !^/mysite.nl/    
RewriteRule    (.*)    /mysite.nl/$1    

#Rule-1
RewriteCond    %{HTTP_HOST}    ^www.mysite.com$    
RewriteCond    %{REQUEST_URI}    !^/mysite.com/    
RewriteRule    (.*)    /mysite.com/$1    

#Rule-2
RewriteCond    %{HTTP_HOST}    ^www.mysite.eu$    
RewriteCond    %{REQUEST_URI}    !^/mysite.eu/    
RewriteRule    (.*)    /mysite.eu/$1    


####ACCESS_HEADER###
<LIMIT GET POST>
</
LIMIT>
####ACCESS_TAILER###

anyone know how to get rid of wrong produced url?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top