Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

htaccess question

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  virtual hosting  
Author Message
filth

External


Since: Oct 04, 2003
Posts: 2



(Msg. 1) Posted: Sat Oct 04, 2003 3:43 pm
Post subject: htaccess question
Archived from groups: alt>apache>configuration (more info?)

Hi

I am writing a page but need it so that links look like the following:-

http://mysite/variable/

variable is not actually a folder but a variable.

I have seen it before but can't fnd it at the moment where script can be put
into the htaccess file so that the folder name is passed as a variable to a
certain script specified in the file.

Please can you either let me know what this script it or to forward me to a
site that may be able to help

Cheers For Any Help

Peter

 >> Stay informed about: htaccess question 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Sat Oct 04, 2003 3:53 pm
Post subject: Re: htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Peter McDonald <filth.RemoveThis@blueyonder.co.uk> wrote:
 > I am writing a page but need it so that links look like the following:-
<font color=purple> > <a style='text-decoration: underline;' href="http://mysite/variable/</font" target="_blank">http://mysite/variable/</font</a>>
 > variable is not actually a folder but a variable.

Use mod_rewrite to alter the URL and call your script with your
variable.

Something like

RewriteCond %{REQUEST_URI} !^/cgi-bin/yourscript.cgi.*$
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^/(.*)$ /cgi-bin/yourscript.cgi?var=$1

See the documentation on mod_rewrite

Davide<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: htaccess question 
Back to top
Login to vote
filth

External


Since: Oct 04, 2003
Posts: 2



(Msg. 3) Posted: Sat Oct 04, 2003 5:51 pm
Post subject: Re: htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Use mod_rewrite to alter the URL and call your script with your
 > variable.
 >
 > Something like
 >
 > RewriteCond %{REQUEST_URI} !^/cgi-bin/yourscript.cgi.*$
 > RewriteCond %{REQUEST_URI} !^/$
 > RewriteRule ^/(.*)$ /cgi-bin/yourscript.cgi?var=$1
 >
 > See the documentation on mod_rewrite

cheers Davide

will have a look for that<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: htaccess question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
htaccess question - If I access my web page with just the ip address such as, http://123.123.123.123 I only get prompted once for the user id and password. If I access the page by the domain name such as, www.server.host.com it will prompt me for the user id and password....

htaccess question - Hi, I'm quite new with Apache (1.3.27), so this might be a simple question. I want to restrict the access to a directory using htaccess. A user from the local net (192.168.xxx.xxx) should be able to access this directory without any login, any other user...

newbie question about .htaccess - I have a private website folder which I would like to password protect so I have followed the instructions on the Apache website and some other sites to write an .htaccess file. This results in a pop up box which asks for the username and password. The..

Need help with .htaccess - Hi, I'm a newbie to apache. I just create a .htpasswd .htaccess in my ~/www/.htaccess and ~/www.htpasswd. OS Solaris 8 ..htaccess file AuthType Basic AuthName "Secret Section. Password Required" AuthUserFile /www/.htpasswd Require valid-u...

what is .htaccess ? - Hi Ive recently purchased an apache webserver from am ISP which i access through webmin. In there i can access the file: httpd.conf This file appears to hold all the config. In here i can make changes, setup websites etc. I have been reading up o...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]