|everything after some weird text, send to homepage|
everything after some weird text, send to homepage
Hey, i cant seem to find this problem on ur site.
i need to redirect 100s of conditions like this to the homepage:
..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.
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.
the above didn't work for some reason
I want to redirect 100+ urls like this:
.. to the homepage http://example.co.za/
That is not at all what you asked for initially.
Adapt the 'template' in my first post to do what you want.
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 ?
with everything i mean, everything that will ever be entered after the /index.php/ part by a user.
Is this possible ?
Is this a URL path, a filename, query string data, or any combination of those things?
RewriteRule ^index\.php/ http://example.com/? [R=301,L]