Welcome to WebmasterWorld Guest from 107.23.176.162

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Rewriting URLs without mod_rewrite

Rewriting URLs without mod_rewrite

     
5:54 pm on Mar 26, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 26, 2003
posts:7
votes: 0


Hi guys,

This is my first post, so please be gentle!

I know that mod_rewrite has been mentioned a lot in this section of the forum, but I can't quite seem to find exactly what I'm looking for. If someone asked the same question elsewhere, please point me in the right direction.

I am moving hosts and am currently using mod_rewrite successfully, but my new hosts do not support mod_rewrite.

As a guide, I'm basically converting

www.domain.com/items/1/

into www.domain.com/database/db/1.php

I used to use the old Rewrite rule in the htaccess file, but I'm stuck on how to achieve the same results without using mod_rewrite. I'm far from advanced, but not exactly a newbie - someone wrote somewhere that the 404 page itself could try to process the URL itself and return 404 if the destination address doesn't exist and show the 'cloaked' URL if it does.

Many thanks for any assistance you can offer me.

7:48 pm on Mar 26, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


uk_webmaster,

You could try RedirectMatch [httpd.apache.org] in mod_alias to achieve similar results in a somewhat less efficient way.

Or not move to any host that doesn't allow you to use the tools you need...

HTH,
Jim

8:09 pm on Mar 26, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 25, 2003
posts:144
votes: 0


Hi UK-Webmaster,

I would change hosts.

7:24 am on Mar 27, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 26, 2003
posts:7
votes: 0


Hi jdMorgan,

Thanks for the link to RedirectMatch - I'll play araound with that.

The reason I have to move from my current host is that they are too expensive, offer awful support and do not allow mysql. This new host I've found (that doesn't support mod_rewrite) is the only one that is reasonably priced while remaining reputable and reliable. They have excellent support and allow plenty of bandwidth etc.

I'll mess around with RedirectMatch and get back to you.

Thanks a lot.

8:23 pm on Mar 27, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 26, 2003
posts:7
votes: 0


Hi,

Thanks for pointing me to RedirectMatch - I used it with partial success in that it called the right page when I entered the 'non-existent' URL, but it changed the URL in the browser bar from the entered one into the actual URL it was reading. With mod_Rewrite, the address in the browser bar remained the 'non-existent' one. Is there a way to get around this in either RedirectMatch or another non-mod_Rewrite method.

Thanks for any light you can shed on this - it is much appreciated.

9:16 pm on Mar 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


uk_webmaster,

Unfortunately, that is the nature of a redirect, as opposed to a rewrite.

Post #3 applies. :(

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members