Reputation: 2859
(There are very similar questions but none of that solved it)
Big question: WHY: When i open www.abc.com, the url looks www.abc.com/foo/drupal715/index.php It should be the same! BUT the other links or pages i created with drupal are working e.g www.abc.com/myproject
Look at my configuration
I have the first .htaccess in root (public_html) which looks like:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^abc.ch$ [OR]
RewriteRule ^(.*)$ /foo/drupal715/$1 [PT,L,QSA]
This redirects to my sub dir works but why the url shows the folder when i open my main url ?
Any help, please! im so tired of trying.
Here the intresting part of the htaccess in drupal root.
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line
#RewriteBase /foo/drupal715
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /
# Pass all requests not referring directly to files in the filesystem to
# index.php. Clean URLs are handled in drupal_environment_initialize().
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/foo/drupal715/(.*)$
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,B]
#RewriteRule ^ index.php [L]
best regards
Upvotes: 1
Views: 696
Reputation: 3353
The way mod_rewrite works is explained in the docs and discussed many times here too.
It works on the server, it does NOT (unless you specifically make a rule to do this) return any changed urls to the client. This is what allows you to create and use "user friendly urls". If your site redirect from one page/folder to another I would suggest you start looking at what is actually being requested and what it actually does. For example - look at your index.php, what does it do?
Upvotes: 2