Search the Community
Showing results for tags 'mod-rewrite'.
-
In my .htaccess, I have the following to enter a domain name then a store number such as www.domain.com/c111 The page storeNumber.php displays perfectly call the correct variables through the _GET. The help I got and has been set up works for an Alpha and thre rest numbers. What would be rewriterule be to use any random string of Alpha Numberic characters? Such as C123, 12CF, cf15, C2f5... RewriteOptions inherit RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-z0-9-]+)$ /storeNumber.php?storeNumberID=$1 [NC,L] Thanks for any help in advance, Mike
- 1 reply
-
- mod-rewrite
- php
-
(and 1 more)
Tagged with:
-
Hi, I am newbie to htaccess. i am using timthumb for resizing the images RewriteRule ^inner-banner/(.*)\.([jpg|gif|png|JPG|GIF|PNG]+)$ timthumb.php?src=http://mydomain.com/images/banner/$1.$2&h=350&w=960&zc=0 [QSA,L] This gives me the result : http://mydomain.com/inner-banner/myimage.jpg Now i mapped a subdomain to the folder images. http://subdomain.mydomain.com is mapped to the images folder. So now i need to show the above result as http://subdomain.mydomain.com/inner-banner/myimage.jpg i modified the htaccess like RewriteRule ^inner-banner/(.*)\.([jpg|gif|png|JPG|GIF|PNG]+)$ timthumb.php?src=http://subdomain.mydomain.com/banner/$1.$2&h=350&w=960&zc=0 [QSA,L] Expected Result: http://subdomain.mydomain.com/inner-banner/myimage.jpg But it is not coming like that. it shows 404. Kindly help me resolving this issue.
-
Can anyone please provide me a example and explanation of URL rewriting with PHP only. I already tested using .htaccess and it works fine. What I want to achieve is to rewrite a URL without using a .htaccess. I read some blogs but still can't understand a bit.