Post by Cigs » Thu Dec 08, 2011 9:07 am

In short, when I type http://www.cigs.eu in the browser it redirects me to: http://www.www.cigs.eu. Can somebody please help me correct the .htaccess file?

Code: Select all

Options +FollowSymlinks


# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.cigs\.eu$
RewriteRule (.*) http://www.cigs.eu/$1 [R=301,L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]  

New member

Posts

Joined
Thu Nov 24, 2011 5:23 am

Post by uksitebuilder » Fri Dec 09, 2011 2:11 am

try the following

Code: Select all

Options +FollowSymlinks


# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Cigs » Fri Dec 09, 2011 4:56 am

Thank you uksitebuilder, you actually solved my other problem as well - http://forum.opencart.com/viewtopic.php?f=20&t=27058 Thank you loads!!!

New member

Posts

Joined
Thu Nov 24, 2011 5:23 am

Post by viman » Sat Dec 24, 2011 9:58 pm

Hi All,

Rather than starting a new thread I have posted the question here and hopefully someone can help as it is related to above.

I have updated my .htaccess as described above.
------------------------------------------------------------------------------------------------------------
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
--------------------------------------------------------------------------------

Now please open this link: http://www.naturalskin.co.uk/face-care

And you will find that when you do mouse over on Category or Sub Category or Products then www. is missing however when I click on it, the browse url does show www in the url.

Similarly the home page logo and Home all display http://naturalskin.co.uk/index.php?route=common/home
when I expect that it would show www.naturalskin.co.uk

Any help/guidance would be much appreciated. Thanks.

Newbie

Posts

Joined
Wed Dec 14, 2011 5:00 am

Post by victorj » Sat Dec 24, 2011 10:29 pm

you probally did the install not using www.
you can check in your system -> settings here you can see the store url.
depending on the version of OC you can correct this in system settings in oc 1.4.x
if you use 1.5.x you have to change your database entry

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by viman » Sat Dec 24, 2011 11:41 pm

Hi All,

I found the fix.
Edit config.php file in your root directory. In that file I just added www. in front of the current url which was naturalskin.co.uk and now all url are shown with www.

thanks.

Newbie

Posts

Joined
Wed Dec 14, 2011 5:00 am

Post by viman » Sat Dec 24, 2011 11:42 pm

Sorry and one more thing I do still need to figure our is how to change the home page url from

http://www.naturalskin.co.uk/index.php? ... ommon/home
to
http://www.naturalskin.co.uk

Any help please??

Newbie

Posts

Joined
Wed Dec 14, 2011 5:00 am

Post by viman » Sat Dec 24, 2011 11:58 pm

This is a good day. Above issue also reesolved.

Just added the following to htaccess file and index page has a nice clean url.

RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://www.yoursite.com? [R=301,L]

Thanks everyone for your help on this topic.

Newbie

Posts

Joined
Wed Dec 14, 2011 5:00 am

Post by xlam » Sun Jan 22, 2012 11:43 am

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymLinks
RewriteEngine On

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log|txt)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://www.fixprint.net? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
work fine for me. front store & admin page is working fine.

Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya


New member

Posts

Joined
Sun Dec 25, 2011 2:58 pm
Who is online

Users browsing this forum: Amazon [Bot] and 26 guests