SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 03-18-2005, 02:40 AM
itsmani1 itsmani1 is offline
SEO Junior
 
Join Date: Mar 2005
Location: Islamabad, Pakistan
Posts: 20 itsmani1 is on a distinguished road
Send a message via MSN to itsmani1
about url rewrite

these regular expressions are not doing any thing for me.
here is some explanation!!!!!!!

@ root dir i have pages like:
index.php, search.php, etc

Folder of css
Folder of images
Folder of uploads

Problem:::
css files on index and all the pages are coming form css folder
some of the images are coming form images folder and rest are coming
from uploads.

what i have to do is :::::
i have to rewrite urls
http://domain.com/posters/index.php?pag=news
http://domain.com/posters/index.php?pag=news1
http://domain.com/posters/index.php?pag=about
to
http://domain.com/posters/pag/news
http://domain.com/posters/pag/news1
http://domain.com/posters/pag/about

Muhammad Abdul Mannan
http://mannan.zabvision.edu.pk
http://itsmani1.sphosting.com
__________________
+92-333-524-0141
dizyn@hotmail.com
Offshore Outsourcing to Pakistan
Custom Web Development

Last edited by itsmani1 : 08-18-2005 at 12:44 AM.
Reply With Quote
  #2  
Old 03-18-2005, 12:10 PM
SEO Aaron SEO Aaron is offline
SEO Guy Web dev team
 
Join Date: Feb 2005
Posts: 693 SEO Aaron is on a distinguished road
I am no expert on this but you could try a rewrite rule such as:

Code:
RewriteRule ^([^/]+)/([^/]+)/?$ index.php?$1=$2 [L]


This Seems to work to make:
http://domain.com/posters/index.php?pag=news
into:
http://domain.com/posters/pag/news



If that is what you want.

Aaron

Last edited by SEO Aaron : 03-21-2005 at 06:53 PM.
Reply With Quote
  #3  
Old 03-19-2005, 12:11 AM
sarahk's Avatar
sarahk sarahk is offline
SEO
 
Join Date: Nov 2004
Location: Auckland, New Zealand
Posts: 177 sarahk is on a distinguished road
Send a message via ICQ to sarahk
Don't mess with your rewrite, it's probably ok

in your links to the images and css give this notation

Code:
<link rel="stylesheet" type="text/css" href="/css/layout.css"/>


where you have a / at the beginning. This tells the server that it's not a relative link but coming from the domain root. It doesn't matter where your page is, it will always look for your css, image, wav file in the same place.

Sarah
__________________
A Real Estate Directory using simple seo techniques!
Reply With Quote
  #4  
Old 03-21-2005, 04:20 AM
itsmani1 itsmani1 is offline
SEO Junior
 
Join Date: Mar 2005
Location: Islamabad, Pakistan
Posts: 20 itsmani1 is on a distinguished road
Send a message via MSN to itsmani1
url rewrite problem

problem to me is:
it shows link in url bar like this:
http://www.artologics.com/posters/index.php?pag=aboutus
but it should show like this::
http://www.artologics.com/posters/pag/aboutus
one more thing is this.....
when i write
http://www.artologics.com/posters/pag/aboutus
in url bar it works fine gives good result but then changes url to
http://www.artologics.com/posters/index.php?pag=aboutus
why?????????

Muhammad Abdul Mannan
http://mannan.zabvision.edu.pk
http://itsmani1.sphosting.com
itsman1@hotmail.com
Reply With Quote
  #5  
Old 03-22-2005, 10:08 AM
SEO Aaron SEO Aaron is offline
SEO Guy Web dev team
 
Join Date: Feb 2005
Posts: 693 SEO Aaron is on a distinguished road
Are You Using mod_rewrite? If so..then can I see your rule? I'm not sure that I fully understand.

Aaron
Reply With Quote
  #6  
Old 03-22-2005, 09:46 PM
itsmani1 itsmani1 is offline
SEO Junior
 
Join Date: Mar 2005
Location: Islamabad, Pakistan
Posts: 20 itsmani1 is on a distinguished road
Send a message via MSN to itsmani1
ys sure why not?????
here is code::::

RewriteEngine on
RewriteRule ^catid/([0-9]+).html$ /posters/index.php?catid=$1 [R]
ReWriteRule ^pag/([a-z]+).html$ /posters/index.php?pag=$1 [R]
ReWriteRule ^pag/css/([a-z]+.[a-z]+)$ /posters/css/$1 [R]
ReWriteRule ^pag/images/([a-z]+_[0-9]+.jpg)$ /posters/images/$1 [R]
ReWriteRule ^/catid/uploads/([a-z]+.jpg)$ /posters/uploads/$1 [R]
ReWriteRule ^catid/css/([a-z]+.[a-z]+)$ /posters/css/$1 [R]
ReWriteRule ^catid/images/([a-z]+_[0-9]+.jpg)$ /posters/images/$1 [R]
ReWriteRule ^/catid/uploads/([a-z]+.jpg)$ /posters/uploads/$1 [R]
RewriteRule ^subcat/([0-9]+).html$ /posters/index.php?catid=$1 [R]
ReWriteRule ^subcat/css/([a-z]+.[a-z]+)$ /posters/css/$1 [R]
ReWriteRule ^subcat/images/([a-z]+_[0-9]+.jpg)$ /posters/images/$1 [R]
ReWriteRule ^/subcat/uploads/([a-z]+.jpg)$ /posters/uploads/$1 [R]

Muhammad Abdul Mannan
http://mannan.zabvision.edu.pk
http://itsmani1.sphosting.com
itsmani@gmail.com
itsmani1@hotmail.com
Reply With Quote
  #7  
Old 03-30-2005, 10:52 AM
SEO Aaron SEO Aaron is offline
SEO Guy Web dev team
 
Join Date: Feb 2005
Posts: 693 SEO Aaron is on a distinguished road
I am sorry I cannot help with that, maybe someone could see why this rule
Code:
RewriteRule ^([a-zA-Z_-]+)\.php$ /project_test/index.php?id=$1 [L] 

Is Giving me an internal server error. I suspect the problem lies in the \.php$ area of the rule :-)

Thanks.
Reply With Quote
  #8  
Old 04-01-2005, 07:34 AM
cvele's Avatar
cvele cvele is offline
SEO Junior and a half
 
Join Date: Jan 2005
Posts: 84 cvele is on a distinguished road
Send a message via ICQ to cvele
Try :

Code:
RewriteRule ^([A-Za-z0-9\+\-]*).* project_test/index.php?id=$1 [L,NC]
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 08:54 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.