1
votes

I found similar topics, but not an answer working for me.

My htaccess is actually :

RewriteEngine on


# remove www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [NE,R=301,L]

RewriteCond %{HTTP_HOST} ^(www\.)?publigraphix\.com$
RewriteRule !^Jomla_344french/ /Jomla_344french%{REQUEST_URI}  [L]/Jomla_344french%{REQUEST_URI}  [L]

With this, I can hide the subfolder in the url of my homepage, but it appears again by opening any page of my website.

How can I hide the subfolder in the url on all pages ?

Thank You for help, this is my first post. Greetings,

Susanne

Thanks for Your help. Now my htaccess is like this : RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?publigraphix.com$ RewriteCond %{THE_REQUEST} /Jomla_344french/(.*)\sHTTP [NC] RewriteRule ^ /%1 [NE,L,R] RewriteCond %{HTTP_HOST} ^(www.)?publigraphix.com$ RewriteRule !^Jomla_344french /Jomla_344french%{REQUEST_URI} [NC,L]

For the homepage, this works fine, but in the subpages, the url displays /index.php/ with an 404 error (for example url shows : publigraphix.com/index.php/tampons instead of publigraphix.com/tampons ...) Do You have an idea?

1
what url are you going to? - Amit Verma
@starkeen www.publigraphix.com should open publigraphix.com/Jomla_344french/index.php - Susanne52
I want to hide the subfolder /Jomla_344french in all pages on that website but actually it is only hidden on the homepage - Susanne52

1 Answers

0
votes

To hide the subfolder ,you can use

RewriteEngine on


# remove www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [NE,R=301,L]

RewriteCond %{HTTP_HOST} ^(www\.)?publigraphix\.com$
RewriteCond %{THE_REQUEST} /Jomla_344french/(?:index\.php/)?(.*)\sHTTP [NC]

RewriteRule ^ /%1 [NE,L,R]
RewriteCond %{HTTP_HOST} ^(www\.)?publigraphix\.com$
RewriteRule ^((?!Jomla_344french).*) /Jomla_344french/index.php/$1  [NC,L]