I have a question for you guys.
Let's say I have a site called mywebsite.com.
A user types in mywebsite.com/something. I want that address to lead him to a webpage. How do I do this?
Thanks.
Subfolder redirect
Started by jazzyfan, Aug 26 2007 10:02 PM
4 replies to this topic
#1
Posted 26 August 2007 - 10:02 PM
#2
Posted 27 August 2007 - 02:09 AM
What exactly do you mean? A simple redirect to another website located on another domain(for example: mywebsite.com/xyz directs to yourwebsite.com) or do you wan to redirect it to the same domain with a specific parameter(for example: mywebsite.com/users/4 directs to mywebsite.com?uid=4)?
The first thing could easily be done with a simple meta:
<meta http-equiv="Refresh" content="1; URL=http://www.cs.uni-frankfurt.de/~www1test/redirect.html">
For the second type you would need a .htaccess file and the mod_rewrite engine:
RewriteEngine on
RewriteRule ^/kategorien/([0-9]+)$ /warenkorb.php?action=show&kat=$1
Hope this helps.
Sincerely,
Chris
The first thing could easily be done with a simple meta:
<meta http-equiv="Refresh" content="1; URL=http://www.cs.uni-frankfurt.de/~www1test/redirect.html">
For the second type you would need a .htaccess file and the mod_rewrite engine:
RewriteEngine on
RewriteRule ^/kategorien/([0-9]+)$ /warenkorb.php?action=show&kat=$1
Hope this helps.
Sincerely,
Chris
#3
Posted 27 August 2007 - 03:19 PM
Use the Apache Mod_Rewrite module, do a search and there are plenty of topics discussing how to use it on these forums, and just about anywhere on Google.
#4
Posted 27 August 2007 - 09:50 PM
I'm not sure any of that's going to work for my site, but thanks anyways. I appreciate it.
I'm on Windows server, and PHP is not a possibility for me, and I have no clue about programming languages at all.
But thanks anyway.
I'm on Windows server, and PHP is not a possibility for me, and I have no clue about programming languages at all.
But thanks anyway.
#5
Posted 28 August 2007 - 05:38 PM
Nothing posted here has to do with PHP.
.htaccess has nothing to do with PHP, it is an Apache mod, so if you have the Apache server running for your web server, then you can use it.
A meta refresh is a piece of HTML, so if you are outputting a webpage in HTML, you can use it.
.htaccess has nothing to do with PHP, it is an Apache mod, so if you have the Apache server running for your web server, then you can use it.
A meta refresh is a piece of HTML, so if you are outputting a webpage in HTML, you can use it.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
