Irish SEO,  Marketing & Webmaster Discussion

 

Quick mod_rewrtie quesyion

This is a discussion on Quick mod_rewrtie quesyion within the Coding Help forums, part of the Webmaster Help category; I want to have a page like www.mysite.com/myname from www.mysite.com/profile.php?name=myname , i have this but cant figure it out!?? Code: ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 25-02-2008, 04:09 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 363
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default Quick mod_rewrite question

I want to have a page like www.mysite.com/myname from www.mysite.com/profile.php?name=myname, i have this but cant figure it out!??
Code:
RewriteRule ^/([^/]*)\$ /profile.php?name=$1 [L,NC]

Last edited by ziycon; 25-02-2008 at 11:28 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 25-02-2008, 04:15 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 363
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default

Using this now and im getting an internal 500 error!?!
Code:
RewriteRule ^([^/]*)$ /profile.php?name=$1 [L]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 25-02-2008, 05:33 PM
Frodo's Avatar
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 336
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Default

Code:
Options +FollowSymLinks
RewriteEngine On

RewriteRule ^([^/\.]+)/?$ profile.php?name=$1 [L]
That should do it.
__________________

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 25-02-2008, 06:16 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 363
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default

Ok, that works fine, but if i got to the www.mysite.com/myname it throws the error page but if i go to www.mysite.com/profile.php?name=myname it works!?!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 25-02-2008, 06:22 PM
paul's Avatar
Web Whore
 
Join Date: Dec 2006
Location: .de
Posts: 982
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

ziycon : I've found this site great : MOD_REWRITE WIZARD // beta
I've used it on my Green Card site, and it worked well.
__________________
my sites :
irish poker / irish jobs / seo faq / advertise jobs free / green card / skiing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 25-02-2008, 06:26 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 363
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default

Quote:
Originally Posted by paul View Post
ziycon : I've found this site great : MOD_REWRITE WIZARD // beta
I've used it on my Green Card site, and it worked well.
I was using it but the code it gave me made the 500 error come up!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 25-02-2008, 06:29 PM
paul's Avatar
Web Whore
 
Join Date: Dec 2006
Location: .de
Posts: 982
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

500 error is an internal server error. When you have mod rewrite in place, you should still be able to see the URL for the non mod-rewrite'd page , right ? Have you tried this ? Maybe the error is in your script.
__________________
my sites :
irish poker / irish jobs / seo faq / advertise jobs free / green card / skiing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 25-02-2008, 06:35 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 363
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default

Quote:
Originally Posted by paul View Post
500 error is an internal server error. When you have mod rewrite in place, you should still be able to see the URL for the non mod-rewrite'd page , right ? Have you tried this ? Maybe the error is in your script.
All i did was change the .htacess line to what i posted in the second post in this thread and it gave me a 500 internal error, once i removed it the site was fine!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 25-02-2008, 06:45 PM
Frodo's Avatar
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 336
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Default

Can you post your full .htaccess file there should be no problems with the code I said above.
__________________


Last edited by Frodo; 25-02-2008 at 06:52 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 25-02-2008, 06:48 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 363
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default

Quote:
Originally Posted by Frodo View Post
Can you post your full .htacess file there should be no problems with the code I said above.
Sorted it just this second, was missing one letter in the .htaccess file! Thanks for the help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
modrewrtie, quesyion, quick

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
A quick plug! EdenWeb Off topic discussion 3 29-01-2008 10:09 PM
resizing the quick reply box paul Forum Feedback, Development and Competitions 6 15-01-2008 02:57 PM
Quick question Re:pr kjt Search Engine Optimisation 8 08-11-2007 11:26 AM
Another quick review... davidbehan Site Reviews / Announcements 18 03-06-2007 07:46 PM
A quick review louie Site Reviews / Announcements 5 25-02-2007 12:30 AM


All times are GMT +1. The time now is 12:55 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0