doctorbill
asked on
http redirects
I have an xampp (Apache) server setup such that the Wordpress files are in the following directory:
htdocs/Wordpress
If I use http://localhost/wordpress the site works perfectly well
I need to be able to type in the public website address such that the original request is diverted to the Wordpress/Index.php file rather than typing http://mydomainname.com/wordpress
ie. http://www.mydomainname.com
This should then reference the Wordpress/Index.php file
Please can someone tell me how to achieve this - .htaccess?, redirect ?
I need clear instructions please as I am not familiar with the apache server setup
htdocs/Wordpress
If I use http://localhost/wordpress the site works perfectly well
I need to be able to type in the public website address such that the original request is diverted to the Wordpress/Index.php file rather than typing http://mydomainname.com/wordpress
ie. http://www.mydomainname.com
This should then reference the Wordpress/Index.php file
Please can someone tell me how to achieve this - .htaccess?, redirect ?
I need clear instructions please as I am not familiar with the apache server setup
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried this but I get a page not displayed
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?inventas.co.uk$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /my_subdir/$1
RewriteCond %{HTTP_HOST} ^(www.)?inventas.co.uk$
RewriteRule ^(/)?$ my_subdir/index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?inventas.co.uk$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /my_subdir/$1
RewriteCond %{HTTP_HOST} ^(www.)?inventas.co.uk$
RewriteRule ^(/)?$ my_subdir/index.php [L]
</IfModule>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Aaaahhh
Sorry - missed those
Now all ok
Another cheaky question - how to add an ssl to an apache (xampp) server
Sorry - missed those
Now all ok
Another cheaky question - how to add an ssl to an apache (xampp) server
Another cheaky question - how to add an ssl to an apache (xampp) serverBest to ask that in a separate question.
ASKER
ok
Be sure to always use 302s, else you'll always be fighting with browser caching issues...