|
#1
|
|||
|
|||
|
So I have a simple mod_rewrite problem:
I want this: mydomain.com/index.php?p=article&id=24sfhjs2378dhs to be: mydomain.com/article/24sfhjs2378dhs Currently I'm using: Code:
# General Stuff
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
#Domain removal of www.
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?thebabylontimes\.com)$ [NC]
RewriteRule .? http://%1%{REQUEST_URI} [R=301,L]
#Redirection (which is working btw) for a couple pages
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^home /index.php?p=home [L]
RewriteRule ^music /index.php?p=music [L]
RewriteRule ^tech /index.php?p=tech [L]
Thanks so much, this is very urgent. Cheers, -- Nick. |
|
#2
|
||||
|
||||
|
Try something like this. I haven't tested it though.
RewriteRule ^([a-zA-Z_]+)(/([0-9a-zA-Z_]+)/?$ index.php?p=$1&id=$3 [QSA,L] |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mod_Rewrite | GOODY | Off-Topic | 12 | 05-12-2008 08:35 PM |
| mod_rewrite | Clearlime | Shared Hosting Support | 0 | 03-02-2007 01:27 PM |
| Moving a site from my main directory to a sub-directory - HOW? | Mikey | Shared Hosting Support | 1 | 09-21-2006 08:50 AM |
| mod_rewrite | deepsignal | Pre-Sales Questions | 4 | 07-19-2005 12:34 PM |
| mod_rewrite | Unregistered | Pre-Sales Questions | 1 | 03-22-2005 01:38 PM |
All times are GMT -5. The time now is 03:35 PM.









