Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
it is very simple actually, i just want redirect all pages from domain.com/[B]?[/B]
Old 09-10-2009, 08:00 PM it is very simple actually, i just want redirect all pages from domain.com/[B]?[/B]
Skilled Talker

Posts: 78
Name: syu
Trades: 0
it is very simple actually, i just want redirect all pages from

domain.com/?pagename to domain.com/pagename

so i just want to remove the ? character




what is the right Rule in htaccess for it guys?

i try below but its not working, its say error 404



Quote:
RewriteRule http://www.domain.com/?$1 http://www.domain.com/$1






this is working to redirect a page, but i need to redirect every pages

Quote:
Redirect 301 /?pagename http://www.example.com/pagename
__________________
Lets help each other
basketmen is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-10-2009, 11:17 PM Re: it is very simple actually, i just want redirect all pages from domain.com/[B]?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
The "pagename" on the right after the ? is considered a query string parameter. If you are not going to need query parameters (other than the pagename), the following should work (not tested).

RewriteCond %{QUERY_STRING} ^([^=&]+)$
RewriteRule ^(.*)$
http://www.domain.com/%1 [R=301]
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 09-11-2009, 07:30 PM Re: it is very simple actually, i just want redirect all pages from domain.com/[B]?
Skilled Talker

Posts: 78
Name: syu
Trades: 0
hmm its still not working, its say error 404 not found, is there other rule bro?
__________________
Lets help each other
basketmen is offline
Reply With Quote
View Public Profile
 
Old 09-11-2009, 10:06 PM Re: it is very simple actually, i just want redirect all pages from domain.com/[B]?
bmcoll3278's Avatar
Super Talker

Posts: 118
Name: Brian Collins
Trades: 0
This should work
Code:
Options +FollowSymLinks
RewriteEngine on


RewriteRule pagename(.*)\.html$ /pagename.php?art=$1

you have to duplicate it for each pagename.

now instead of
www.domainname.com/pagename.php?var=3
it would be
www.domainname.com/pagename3.html

Is this what you want to get done?
__________________
I hope to build a site with something for every one

Please login or register to view this content. Registration is FREE
bmcoll3278 is offline
Reply With Quote
View Public Profile Visit bmcoll3278's homepage!
 
Reply     « Reply to it is very simple actually, i just want redirect all pages from domain.com/[B]?[/B]
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13403 seconds with 12 queries