Welcome to WebmasterWorld Guest from 54.163.23.73

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

everything after some weird text, send to homepage

everything after some weird text, send to homepage

     

getoffmyisland

10:24 am on Jun 21, 2010 (gmt 0)

5+ Year Member



Hey, i cant seem to find this problem on ur site.

i need to redirect 100s of conditions like this to the homepage:

http://example.com/example.com?querystring1=this&querystring2=that

..so everything after, and including, example.com?, must go to homepage, http://example.com/

i also have this similar problem, redirecting http://example.com/index.php/keyword1/example.html to hompage.
problem is again, i need to redirect 100's such URLs, EVERYTHING (including querystrings) after http://example.com/index.php/

pls help or direct me to a post with the solution.

jdMorgan

1:46 pm on Jun 21, 2010 (gmt 0)

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



The 'template' for a single-line-solution mod_rewrite rule would be:

RewriteRule ^old-URL-path$ http://example.com/new-URL-path? [R=301,L]

The old-URL-path pattern in this case is "example\.com", the new-URL-path is blank, and the trailing question mark clears the current query string.

RewriteRule ^example\.com$ http://example.com/? [R=301,L]

See the resources cited in our Apache Forum Charter for more information.

Jim

getoffmyisland

3:00 pm on Jun 21, 2010 (gmt 0)

5+ Year Member



the above didn't work for some reason

I want to redirect 100+ urls like this:

http://www.example.co.za/index.php/component/option,com_mailto/link,aHR0cDovL3d3dy5vbmVzb2xhci5jby56YS9pbmRleC5waHAvY29udGFjdC11cy5odG1s/tmpl,component/

.. to the homepage http://example.co.za/

jdMorgan

3:14 pm on Jun 21, 2010 (gmt 0)

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



That is not at all what you asked for initially.

Adapt the 'template' in my first post to do what you want.

Jijm

getoffmyisland

7:20 am on Jun 22, 2010 (gmt 0)

5+ Year Member



sorry for misunderstanding, i'm having trouble explaining what i want..

I want to the redirect everything, after the /index.php/ part to redirect to the homepage (as i tried to explain in the 1st post).

Is this possible with a simple rule, or must i redirect every url with a seperate rule ?

getoffmyisland

1:20 pm on Jun 22, 2010 (gmt 0)

5+ Year Member



with everything i mean, everything that will ever be entered after the /index.php/ part by a user.

Is this possible ?

g1smd

1:21 pm on Jun 22, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Everything after

Is this a URL path, a filename, query string data, or any combination of those things?

jdMorgan

3:16 pm on Jun 22, 2010 (gmt 0)

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




RewriteRule ^index\.php/ http://example.com/? [R=301,L]

Jim
 

Featured Threads

Hot Threads This Week

Hot Threads This Month