Jump to content

Installed presta under a sub directory off the root, works ! can I hide the sub folder name from displaying?


Recommended Posts

Hi there,


Ive sorted out prestashop finally!!!!! Server problems really.

Had to install in a subfolder off the root and then only use 755 permissions instead of 777.

One thing I would like to do is hide the sub folder name from displaying in the url
http://www.mydomain.co.uk/presta

Can i hide "presta" from showing up?

Also could i use webdiversion, and if so would my url be blacklisted by search engines just for having a web diversion setup on it ???

Thanks

Paul

Link to comment
Share on other sites

The proble to solve is HIDING.
Redirect does NOT hide anything.
Rewrite DOES hide.

Apache 1.3:
httpd.apache.org/docs/1.3/mod/mod_rewrite.html

Apache 2.2:
httpd.apache.org/docs/2.2/mod/mod_rewrite.html

Other HTTP servers: I do not know.

Link to comment
Share on other sites

  • 10 months later...
  • 1 month later...
Thanks Mirifica. It worked like a charm.

in your .htaccess file, you need something like:



hi JulianM and Mirifica,

I have the same problem.
I have tried to make it but ı could'nt

Could you explain me how to write this code please..

My web site url is showing as: www.maysite.com/PrestaShop
I want to display url as : www.mysite.com

please write the code as same as I will put on the file.
thanks for your help.

have a nice day..
Link to comment
Share on other sites


My web site url is showing as: www.maysite.com/PrestaShop
I want to display url as : www.mysite.com


It should look like this one
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/PrestaShop
RewriteRule ^(.*)$ PrestaShop/$1 [L] 


or some light variation thereof.

Link to comment
Share on other sites


My web site url is showing as: www.maysite.com/PrestaShop
I want to display url as : www.mysite.com


It should look like this one
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/PrestaShop
RewriteRule ^(.*)$ PrestaShop/$1 [L] 


or some light variation thereof.



is this file htacces.txt?

if yes; the file includes the following code as same as in the page;
# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php


and I have added your suggested code and it become as follow;

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/PrestaShop
RewriteRule ^(.*)$ PrestaShop/$1 [L]
[/code]


and it did not work. it is still showing "PrestaShop" on the URL.

I have put as follow too:


# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteCond %{REQUEST_URI} !^/PrestaShop
RewriteRule ^(.*)$ PrestaShop/$1 [L]
[/code]

# Catch 404 errors
ErrorDocument 404 /404.php

it did not work too. it is still showing "PrestaShop" on the URL.

and I have tried as follow too;

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteCond %{REQUEST_URI} !^/PrestaShop RewriteRule ^(.*)$ PrestaShop/$1 [L] [/code]


# Catch 404 errors
ErrorDocument 404 /404.php


and it did not work again.

so please

is there any other way tu put the code in the page.

thanks for everything..
Link to comment
Share on other sites

ok. I have found a different solutuon.
1- I have changed directory name form folder manager

2 I have put the same name on setup configiration settings on PrestaShop BO.

now . everything is ok for me.

Link to comment
Share on other sites

×
×
  • Create New...