I think this is related to URL-Rewriting but not sure

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

I think this is related to URL-Rewriting but not sure

Post by legend986 »

I am trying to build my personal website in my university webspace but because they are not offering mysql, I'm planning to install Joomla on my own server. People would be accessing my website as:

Code: Select all

http://www.university-name.com/~username
But my actual website will be stored at

Code: Select all

http://www.mywebserver.com/personal/
I wanted to know if this is possible:

Whenever someone visits my personal page through the university link, all the links on my personal website should be relative links i.e. if someone wants to visit the about us page in my personal page it should be http://www.university-name.com/~username/about.html and whenever someone wants to visit through a direct link, anything is fine. There are only a few links on my website so even some manual solution will be appreciated. Is this possible?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

RewriteEngine On
RewriteRule ^~([a-zA-Z0-9_-]+) /personal/?username=$1
Not sure this is exactly what you want, but it should get you started. Simply matches usernames with a-Z 0-9 _ - characters and sets the $_GET['username']
hgmmy
Forum Commoner
Posts: 25
Joined: Sun Aug 26, 2007 9:16 am

Post by hgmmy »

Here's a couple of links you might find helpful, and note that in order to do what your wanting to do your school will need mod_rewrite enabled...

http://www.yourhtmlsource.com/sitemanag ... iting.html
http://www.workingwith.me.uk/articles/s ... od_rewrite
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I wouldn't know where to start with this, since you are wanting to serve files from one server through a URL of another. Can you upload files to the UNI server and cURL to your own, or something like?
Post Reply