WAMP site home page

I installed WAMP on my PC to develop a small site accessible for members of a club
I have a domain name via NO-IP, which is cbsl.ddns.net
I created under wamp\www a directory for my site. It is named CBSL
To access the site, users have to code cbsl.ddns.net/cbsl (otherwise they arrive on the WAMP admin page).
Is there a trick to access the site without mentioning the /cbsl ?
A kind of redirection in Apache to be set up ?
Thanks
LVL 1
LeTayAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
you could use a ,htaccess file in your www directory, in this .htaccess file you can add something like this:

RewriteEngine On
RewriteRule ^$ /cbsl [L]

Open in new window


Think that should to the trick.
0
LeTayAuthor Commented:
Well, now I get this error in my browser :

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at cbsl.ddns.net Port 80
0
Zephyr ICTCloud ArchitectCommented:
Hmmm, ok try this...

RewriteEngine on
RewriteCond %{HTTP_HOST} ^cbsl.ddns\.net$
RewriteRule (.*) http://cbsl.ddns.net/$1 [R=301,L]
RewriteRule ^$ cbsl [L]

Open in new window

0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Zephyr ICTCloud ArchitectCommented:
Or maybe this would be better:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^ddns\.net$
RewriteRule (.*) http://cbsl.ddns.net/$1 [R=301,L]
RewriteRule ^$ cbsl [L]

Open in new window

0
Zephyr ICTCloud ArchitectCommented:
Another easy one to try:

RewriteEngine on
RedirectMatch ^/$ /cbsl

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Zephyr ICTCloud ArchitectCommented:
I made an error earlier, this is the correct way to do this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^cbsl\.ddns\.net$
RewriteRule (.*) http://cbsl.ddns.net/$1 [R=301,L]
RewriteRule ^$ cbsl [L]

Open in new window

0
LeTayAuthor Commented:
I copy/pasted your last proposal, same error
0
LeTayAuthor Commented:
Idea ...
I was thinking about changing the current index.php which is located in the www directory to "call" from there the index.php located in www\cbsl (and rename the actual index.php)
0
Zephyr ICTCloud ArchitectCommented:
Maybe I was jumping the gun a little, did you enable mod_rewrite and .htaccess through httpd.conf and then put the code in your root/.htaccess because that could be the reason it's not working.

I don't think changing index.php is the good way to go, the ,htaccess way should be working...
0
LeTayAuthor Commented:
Indeed not
I am a real beginner with Apache
Can you tell me exactly where I have (and what) to change in the httpd.conf ?
Thanks
0
Zephyr ICTCloud ArchitectCommented:
There should be a module you can enable named mod_rewrite or something ... That being said...
I'm not too familiar with Wamp myself but I think you can get to the httpd.conf like this (if it's stil valid)

Left click wampmanager -> Apache -> httpd.conf (This will open it in notepad).
Find following line:
#LoadModule rewrite_module modules/mod_rewrite.so

Open in new window


Remove the comment symbol '#' to activate it.

Save and restart Apache.

I'll check if there's more needed...
0
Zephyr ICTCloud ArchitectCommented:
Also found this might be helpful
0
LeTayAuthor Commented:
Many thanks now it works perfectly !
0
Zephyr ICTCloud ArchitectCommented:
Sweet!! Sorry I was jumping the gun ... Assuming and such ;-)
0
LeTayAuthor Commented:
I have a second question : later on, i will move "my" site from my local PC to another site (hosted by OVH company).
What will I have to change on my site (during a certain period after which I will suppress my site definitively), on Apache to redirect to that other site instead of mine
To be practical, to site says "cbsl.be"
0
Zephyr ICTCloud ArchitectCommented:
Hi,

I'd like to answer your question, but best way to do this is to start a new one (if you didn't already)... It's not for the points, don't care about that, but it's EE's policy.

Thanks.
0
LeTayAuthor Commented:
Ok, will do that
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.