thanks for reading, pls help out if u can :)
if i want to redirect the entire forum.jalan2.com to subfolder, whats the best way to do it ?
So its on jalan2.com/forum/
How to make EVERY PAGE redirect correctly when accessed from the google ?
Say this page :
forum.jalan2.com/topic/9689-mimiland-batu-payung-village-singkawang-bengkayang/
So it becomes
jalan2.com/forum/topic/9689-mimiland-batu-payung-village-singkawang-bengkayang/
I dont want thousands of the old pages to redirect to only 1 page which is forum home at jalan2.com/forum/
i want each page redirect exactly to the new page location
Thanks :)
Rudy
Add this to your .htaccess in your web root / directory of forum.jalan2.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^forum.jalan2.com$ [NC]
RewriteRule ^(.*)$ http://jalan2.com/forum/%{REQUEST_URI} [R=301,NC,L,QSA]
Related
I am looking for a way to write a mod_rewrite in order to insert a directory into an URL? I want to redirect old URLs to new URLs like so:
old URL: http://www.domain.com/viewtopic.php?f=1&t=128468
new URL: http://www.domain.com/forum/viewtopic.php?f=1&t=128468
I would like this to work for all values of 'f' and 't'. Thanks!
This works:
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} !/forum/
RewriteCond %{REQUEST_URI} /viewtopic
RewriteRule ^viewtopic\.php$ /forum/viewtopic\.php [L,R=301]
</IfModule>
The first line checks that /forum/ is NOT already present in the URI.
The second line checks that /viewtopic is present in the URI.
the third line replaces viewtopic.php with /forum/viewtopic.php
Can you please help me this?
i have classified site: 99clix.in/latest/ , Actually it is under construction. it creates dynamic dynamics urls, i want to convert into seo friendly urls.
Eg:
DYnamic Url: http://www.99clix.in/latest/index.php?welcome/category/Mobile-Phones/Mobile-phones
Static Url:
http://www.99clix.in/latest/Mobile-Phones/Mobile-phones.
Same way i need to create for all categories and subcategory as per user search.
can you help me out for this?
Write below code in .htaccess file in your root directory, this will allow you allow you to access url without index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Please provide little more detail about your application so we can provide more personalized solution -- are you using any framework etc..
You can check this by taking any URL and append it with inco.in and enter it in search bar then you will get same page . Why and how it's happening ?
This is an image of redirected web page .
Probably,
The webpage owner inco.in use simple .htaccess redirect
RewriteEngine on
RewriteCond %{HTTP_HOST} ^inco.in [NC]
RewriteRule ^(.*)$ http://inco.in/$1 [L,R=301,NC]
I currently have a vbulletin forums that I coppied the theme of to another site to make an application.
with this at the top of the files:
<base href="http://example.com/forums/"/><!--[if IE]></base><![endif]-->
So I simply copied/pasted the source code then modified the body.
The problem here is I have a "submit.php" button and what it does it goes based upon the base url so it becomes http://example.com/forums/submit.php but I want it to do this instead:
http://application.example.com/submit.php
If I change the BASEURL from the source code the theme won't work anymore and I'm trying to preserve the theme
If you use apache with mod_rewrite, you can create the .htaccess file in the root directory
RewriteEngine on
# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Only apply to URLs that aren't already under folder forums.
RewriteCond %{REQUEST_URI} !^/forums/
# Rewrite all those to insert /forums.
RewriteRule ^(.*)$ /forums/$1
Documentation
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
I'm having trouble redirecting my main website www.mydomain.com to the folder mydomain.com/stuff/public_html/index.html while retaining www.mydomain.com in the URL. I'd prefer to use HTA over some html solution, but what's the most SE friendly and modern solution for this?
I've tried the simple HTA 301 redirect below, but it shows the file path which I want to avoid.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$
RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\/stuff\/public_html\/" [R=301,L]
Thanks!
Looks like you do not need an external redirect. You need an internal redirect. For this you need to remove the [R] flag in your rule (and have only [L]). The [R] flag forces an external redirect with a HTTP 301 response code.