I am having trouble getting a 301 redirect to work with a space in the original URL. I seem to get internal server errors whatever I try... The address I am redirecting is: http://www.steinbeck-reeves.co.uk/Bathrooms.html changefreq=monthly priority=1.0 Code (markup): What I really want to do is strip off the space and everything afterwards for all addresses where there is a space and following parameters. I read that a space should be entered as \s - is that correct? This all came about when Google appeared to misread a sitemap file and seems to be taking forever to forget the old one. Thanks, Michael
I'm having an issue with mod_rewrite as well... not sure if this is possible to even do but.... I have dynamically created links on my site that link to /blog/TXX/ (where XX is a number) I want them to pull data from /blog/index.php/TXX/ While still displaying the shorter URL. So far I've got: RewriteRule /blog/T(.*)/ /blog/index\.php/T$1/ [R=301,NC] which brings up the correct data,and RewriteRule /blog/index\.php/T(.*)/ /blog/T$1/ [R=301,L] to try and re-form the URL as the short version but it understandably creates an endless loop. And yes I've tried to just re-make the dynamic page links, but it's not working yet =p Thanks htaccess masters!
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^blog/T([^.]+)/$ blog/index.php/T$1/ [L] R=301 is only for redirecting from one URL to another URL, not for the changing the URL part.
I just posted a question at http://forums.digitalpoint.com/showthread.php?p=9737003#post9737003 where I ask how I may permanent redirect a not working URL from one domain name to another domain name with another URL? I have about 5 URL's that is important enough to do this since the URL's are at the first page of Google And generates a lot of money. At the moment the new URL is located at page 8. I would like the URL: http://www.aktivfritid-shop.no/kategori.asp?maingroup=02 Tredemøller&bid=1 To be 301 permanently redirected to: http://www.aktivshop.no/epages/Akti...ectPath=/Shops/Aktiv_Fritid/Categories/10/100 Is this possible in the .htaccess file? Any idea on how I might do this? We are loosing valuable traffic at the moment and must react fast! I appreciate all the help I may get!
This thread is about the best explanation of mod rewrite I could find. Being me, however, I couldn't get it to work for me. Everything I did yields and Internal Server Error. Then, I tried simply pasting one or two of your samples from the original post, and I still get an ISE. Any ideas?
*cough*Post original URL's and how you want them. *cough* The examples won't work as posted unless you have the exact same file name info. Missing a \ can also cause the ISE message.
Anyone can help me with this?? I want to cloak a link on my site. Let's say I have http://www.theoriginal.com/purchase.php?signupid=1 I want to show on the site as http://www.theoriginal.com and when a user click on this link, it will use the first link above. Is this correct? Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?theoriginal\.com$ [NC] RewriteRule ^(.*)$ http://www.theoriginal.com/purchase.php?signupid=1 [R,L] PHP: Please help. Basically I want to turn domain.com to domain.com/another_sublink.php PLUS ANOTHER. I just created a CGI proxy. I wanted to make the script run only when the submitted it was originated from the site, meaning I want to block direct type in of the url to access the proxy. Anyone can help? Thank you.
Like most miva owners, I have a module which rewrites the categories for seo purposes, and modifies the htaccess : RewriteEngine On RewriteCond %{REQUEST_URI} !-s RewriteRule ^page/(.*) /Merchant2/merchant.mvc?page=$1 But because of miva not allowing a subcategory to belong to 2 different categories, I have some duplicate categories which I'd like to have one redirect to the other. I tried : redirect 301 /page/C/CTGY/ES_ES http://www.condomman.com/page/C/CTGY/Durex-Extra-Sensitive and also : RewriteRule ^page/C/CTGY/ES_ES(.*)$ http://www.condomman.com/page/C/CTGY/Durex-Extra-Sensitive /$1 [R=301,L] but neither worked because it interfered with the code already in place. Any suggestions? I just need to 301 redirect a few categories to their duplicate counterparts (in the above example : www.condomman.com/page/C/CTGY/ES_ES to http://www.condomman.com/page/C/CTGY/Durex-Extra-Sensitive) , but the preceding code keeps interfering with it.
I also need to escape spaces in filenames. I've inherited a site wit spaces in the filenames. I've recoded the whole site but need to redirect the old pages to new. Please tell me how to rewrite the following so the spaces don't cause trouble. RewriteRule ^/Ngai Tahu Whanui/Natural Environment/Customary Fisheries/Regulations http://www.ngaitahu.iwi.nz/Ngai-Tahu-Whanui/Natural-Environment/Customary-Fisheries/ Been looking all morning for a solution, there must be others looking for the same. help appreciated, thanks in advance, Simon.
hi i have my url as http://localhost/vineet/products.php?dealer_id=12&category_id=2 Code (markup): i read your tutorial and created my htaccess file Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^products/(.*)/(.*)\.html$ /products.php?dealer_id=$1&category_id=$2 [L] Code (markup): but when i type in my browser http://localhost/vineet/products/dealer_id/12/category_id/2 Code (markup): or http://localhost/vineet/products/dealer_id/12/category_id/2.html Code (markup): i get 404 error. object not found vineet
That great work , and I hope you may contact me ,for any other web design or software development work. thanks ari www.irachtech.com, , +94773865730
I'm trying to do something la this: when somebody type: www.anynamehere.mywebsite.com or just anynamehere.mywebsite.com to redirect him to www.mywebsite.com/myfolder but in adress bar to see just www.anynamehere.mywebsite.com without myfolder i have this code in my htaccess, but he seems not work: RewriteEngine On RewriteCond %{HTTP_HOST} [a-z]+\.mywebsite\.com RewriteRule (.*) myfolder/$1
I've got an interesting problem I got mod re-write working on my server with regular PHP files, but for my main website i'm using Joomla, Joomla already uses mod-rewrite for SEO friendly URL's but I've done some custom PHP where I use the GET command to pass some variables. I tried changing the already modded URL which looks like this: http://domain.com/page-name.html?var=value value My Variable has a space in it's value like so: RewriteRule ^page-name/value-value$ page-name.html?var=value value Like I said, doing that worked for a regular PHP file on the server but not when I tried it in Joomla, (Joomla uses a htaccess.txt file, I can't find the regular .htaccess file on the server) Thanks for any help Jordan
I have a similar issue: I moved my site to Wordpress and I have some Search Engine listings i need to redirect. How do I redirect a page like domain.com/some-page.php to domain.com/some-page/ I can't find anything on it. Would I need to modify my .htaccess file or edit my permalink structure so somehow so I can create .php pages? Thanks!!
ok i'm having a problem... could someone help me please? I host with godaddy and they say that all of their linux hosting servers have mod_rewrite already installed and turned on. the website i'm trying to rewrite is musicmerchandiseonline . com here is the code Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^bands/(.*)/(.*)\.html$ index.php?bands=$1&content=$2 [L] Code (markup):