YII Framework base URL to change ONLY for inner pages - yii

I am very new to YII Framework.
My task is to change all the inner links of a site point to another domain. the site developed in YII framework. No need to point the home page, only the inner pages to be point to another domain.
Example:
domain name 1 - www.myfirstdomain.com
domain name 2 - www.myseconddomain.com
The inner pages in the domain name 1 must be point to domain name 2.
Example:
1 - www.myfirstdomain.com/reviews/ must be point to www.myseconddomain.com/reviews/
2 - www.myfirstdomain.com/prices/ must be point to www.myseconddomain.com/prices/
Note - I do not want to use rewrite URL of .htaccess
For this I have to change the baseURL for all links, I do not know how to change it.
I have to finish this task ASAP, please help me.
Thanks a lot.

try to change the name of your app folder from myfirstdomain to myseconddomain..
or you may try to see protected->config->main.php and look if there is a global parameter there that declares the name of your website..

Note - I do not want to use rewrite URL of .htaccess
Why not?
This is the simplest solution.
What is the difference between the domains?
Yii will work on any domain controllers if the same.
Changes because only the domain name. Or you have the code uses absolute paths?

Related

Display Domain suggestions having keywords appended in suggestions - WHMCS domain checker

I'm working on WHMCS Latest Version 7. On submitting domain checker form, usually we get the domain availability information and domain suggestions with other extensions. For example: If we search for example.com, We will get a set of suggestions as follows.
example.net
example.org
I need another set of suggestions with some set of words appended with the keyword user selected as follows
theexmaple.net
myexample.net
exmapleonline.net
theexmaple.org
myexample.org
exmapleonline.org
Domain suggestions are implemented by Domain Registrar modules. You can use eNom or ResellerClub for their built in suggestions. Both of those will attempt to use related words in the name to get a better suggestion. If you want behavior exactly like you described, you can write a custom domain registrar module that adds the common prefixes and suffixes you're interested in and then returns results.
http://developers.whmcs.com/domain-registrars/availability-checks/

Is it possible to change MFP(mobile first platform) base URL?

Current MFP URL looks like http://hostname:portNo/Runtimename/adapter/adaptername/path
Is it possible to change base path to
http://localhost:10080/travel/1.1/adapters/flight/listflight
soon after runtime name Travel I want to add give version number or some valuable name.
MFP client SDK will construct the complete URL based on the values in wlclient.properties.
The first part of the URL < http://hostname:portNo/Runtimename/> can be different as long you take care of the routing or redirection at your end.
But the change you are asking is not possible.
If you can put a web server like Apache in front of it, you might be able to use mod_rewrite to do some of that.

Planning url rewrite for my web app

I'm working on a site which shows different products for different countries. The current url scheme I'm using is "index.php?country=US" for the main page, and "product.php?country=US&id=1234" to show a product from an specific country.
I'm planning now to implement url rewrite to use cleaner urls. The idea would be using each country as subdomain, and product id as a page. Something like this:
us.example.com/1234 -> product.php?country=US&id=1234
I have full control of my dns records and web server, and currently have set a * A record to point to my IP in order to receive *.example.com requests. This seems to work ok.
Now my question is what other things I'd need to take care of. Is it right to assume that just adding a .htaccess would be enough to handle all requests? Do I need to add VirtualHost to each subdomain I use as well? Would anything else be needed or avoided as well?
I'm basically trying to figure out what the simplest and correct way of designing this would be best.
The data you need to process the country is already in the request URL (from the hostname). Moving this to a GET variable introduces additional complications (how do you deal with POSTs).
You don't need seperate vhosts unless the domains have different SSL certs.

How to Apache Rewrite URL without redirect?

Is it possible to replace a url name like http://mysite.com/sub/ with http://sub.mysite.com using htaccess?
I don't want to make a redirect rather than just to map a sub-directory address to a sub-domain address. So when a person types an address like http//sub.mysite.com/image.jpg this address remains in the browser but it reads the content from http//mysite.com/sub/image.jpg
Yes it is possible but you should have root access to the server to start with, you will need to also make some DNS record changes so ensure you have this access also before starting.
I have used both methods previously and they both work, however I found using folders was the winner at the end of the day for our usage, this simplified things significantly for us and we didn't have to worry about changing linkages in scripts, e.g. from http://www.my-site.com/images to http://images.my-site.com depending on the code structure being used.
Instead of typing these long instructions out I am going to give you 2 references that have slightly different approaches depending on if you have a physical folder to use or if it is a variable in the URL. They say it probably as well as I can anyway ;-)
Physical folder method :: URL variable method
I hope this helps you

Dynamic URL Rewriting with IIS6

I've been tasked with making an already existing e-commerce site SE friendly - which in this case means (amongst other things) letting the user change the URL for each page/product through the back end.
The site is an old asp site running on IIS6. I've started looking into http://www.codeplex.com/IIRF and http://www.helicontech.com/isapi_rewrite/ , but I'm a bit dubious about how to let the user change the URLS without them going into the server and hard coding them.
Ionic's Isapi Rewrite Filter runs from a .ini file, so I'm thinking that I will get the back end of the site to write to this ini file based on form inputs.
Does anyone have any experience or advice with regard to this?
edit:server is dedicated
By change URL fro each page, I think you mean change slug, or do you actually mean URL.
Slug: www.somesite.com/products/{slug}
URL: www.somesite.com/{url}
Here is how I would do it.
Give an original structure like this:
www.somesite.com/products.aspx?id=23
with an end goal of it to look like
www.somesite.com/products/the-product-to-be-sold
Or better yet
www.somesite.com/products/23/the-product-to-be-sold
I would create a rule that looks like this.
RewriteRule /products/([0-9]+)/(.*) /products.asp?id=$1&slug=$2 [NC]
That way you don't have to change anything, the name is in the URL for SEO optimization, and the ID is still there too.