Avatar of LeTay
LeTay
 asked on

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
PHPApache Web Server

Avatar of undefined
Last Comment
LeTay

8/22/2022 - Mon
SOLUTION
Zephyr ICT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
LeTay

ASKER
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
Zephyr ICT

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

Zephyr ICT

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

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
Zephyr ICT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Zephyr ICT

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

LeTay

ASKER
I copy/pasted your last proposal, same error
LeTay

ASKER
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)
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Zephyr ICT

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...
LeTay

ASKER
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
SOLUTION
Zephyr ICT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Zephyr ICT

Also found this might be helpful
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
LeTay

ASKER
Many thanks now it works perfectly !
Zephyr ICT

Sweet!! Sorry I was jumping the gun ... Assuming and such ;-)
LeTay

ASKER
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"
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Zephyr ICT

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.
LeTay

ASKER
Ok, will do that