Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get a dynamic url will redirect to Homepage

Status
Not open for further replies.

tondar1

Programmer
May 7, 2012
3
0
0
How can I get a dynamic url will redirect to Homepage
it is on an Apache server
example:
Code:


redirect to:
Code:


I found this code, but does not respond to me ،where this code is wrong?
orginal code
Code:
Redirecting a page without an ID:
Old URL: New URL: RewriteCond %{QUERY_STRING} ^/page/55c9/$
RewriteRule ^$ [R=301,L]

my code:
Code:
Redirecting a page without an ID:
Old URL: New URL: RewriteCond %{QUERY_STRING} ^view=featured$
RewriteRule ^$ [R=301,L]
 
Code:
RewriteEngine  on

RewriteRule ^[URL unfurl="true"]http://mysite.tld$[/URL] [URL unfurl="true"]http://mysite.tld/component/content/?view=featured[/URL]

or

Code:
RewriteEngine on

Redirect 301 /[URL unfurl="true"]http://mysite.tld/component/content/?view=featured[/URL] [URL unfurl="true"]http://mysite.tld[/URL]

OR

Code:
RewriteEngine on

Redirect 301 /component/content/?view=featured [URL unfurl="true"]http://mysite.tld[/URL]


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Hi Thanks for the answer
but
This code does not work. Does not do redirects
 
And this site is definitely being served out from Apache running on Linux/Unix?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top